Debian lenny version packages
[pkg-perl] / deb-src / liburi-perl / liburi-perl-1.35.dfsg.1 / t / rel.t
1 #!/usr/bin/perl -w
2
3 print "1..4\n";
4
5 use strict;
6 use URI;
7
8 my $uri = URI->new("http://www.example.com/foo/bar/");
9
10 print "not " unless $uri->rel("http://www.example.com/foo/bar/") eq "./";
11 print "ok 1\n";
12
13 print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/foo/bar/") eq "./";
14 print "ok 2\n";
15
16 print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/FOO/BAR/") eq "../../foo/bar/";
17 print "ok 3\n";
18
19 print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM:80/foo/bar/") eq "./";
20 print "ok 4\n";
21