6 chdir("t") || die "Can't chdir 't': $!";
7 # fix all relative library locations
9 $_ = "../$_" unless m,^/,;
17 my $file = "roytest$i.html";
19 open(FILE, $file) || die "Can't open $file: $!";
23 if (/^<BASE href="([^"]+)">/) {
25 } elsif (/^<a href="([^"]*)">.*<\/a>\s*=\s*(\S+)/) {
26 die "Missing base at line $." unless $base;
29 $exp = $base if $exp =~ /current/; # special case test 22
31 # rfc2396bis restores the rfc1808 behaviour
33 $exp = "http://a/b/c/d;p?y";
36 $exp = "http://a/b/c/d;p?y";
39 $abs = URI->new($link)->abs($base);
40 unless ($abs eq $exp) {
41 print "$file:$.: Expected: $exp\n";
42 print qq( abs("$link","$base") ==> "$abs"\n);