7 # We used to have problems with URLs that used a base that was
10 $u1 = url("/foo/bar", "http://www.acme.com/");
11 $u2 = url("../foo/", $u1);
12 $u3 = url("zoo/foo", $u2);
14 $a1 = $u1->abs->as_string;
15 $a2 = $u2->abs->as_string;
16 $a3 = $u3->abs->as_string;
18 print "$a1\n$a2\n$a3\n";
20 print "not " unless $a1 eq "http://www.acme.com/foo/bar";
22 print "not " unless $a2 eq "http://www.acme.com/foo/";
24 print "not " unless $a3 eq "http://www.acme.com/foo/zoo/foo";
27 # We used to have problems with URI::URL as the base class :-(
28 $u4 = url("foo", "URI::URL");
31 print "not " unless $u4 eq "foo" && $a4 eq "uri:/foo";
34 # Test new_abs for URI::URL objects
35 print "not " unless URI::URL->new_abs("foo", "http://foo/bar") eq "http://foo/foo";