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