diff options
author | Gisle Aas <aas@oslonett.no> | 1998-09-11 09:54:02 +0000 |
---|---|---|
committer | Gisle Aas <aas@oslonett.no> | 1998-09-11 09:54:02 +0000 |
commit | ee593ea8eae6dfbd5217272b72f3e003d2873965 (patch) | |
tree | c577ea6b8e69aa6ae66a47bd139f546a95608e48 /t/old-absconf.t | |
parent | 961326a44fdf47d1a0278e9ccbe96cdf8c03ae06 (diff) | |
download | uri-ee593ea8eae6dfbd5217272b72f3e003d2873965.tar.gz |
Merged every string object change into the main branch.
Diffstat (limited to 't/old-absconf.t')
-rw-r--r-- | t/old-absconf.t | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/t/old-absconf.t b/t/old-absconf.t new file mode 100644 index 0000000..0f8dabe --- /dev/null +++ b/t/old-absconf.t @@ -0,0 +1,35 @@ +print "1..6\n"; + +use URI::URL qw(url); + +# Test configuration via some global variables. + +$URI::URL::ABS_REMOTE_LEADING_DOTS = 1; +$URI::URL::ABS_ALLOW_RELATIVE_SCHEME = 1; + +$u1 = url("../../../../abc", "http://web/a/b"); + +print "not " unless $u1->abs->as_string eq "http://web/abc"; +print "ok 1\n"; + +{ + local $URI::URL::ABS_REMOTE_LEADING_DOTS; + print "not " unless $u1->abs->as_string eq "http://web/../../../abc"; + print "ok 2\n"; +} + + +$u1 = url("http:../../../../abc", "http://web/a/b"); +print "not " unless $u1->abs->as_string eq "http://web/abc"; +print "ok 3\n"; + +{ + local $URI::URL::ABS_ALLOW_RELATIVE_SCHEME; + print "not " unless $u1->abs->as_string eq "http:../../../../abc"; + print "ok 4\n"; + print "not " unless $u1->abs(undef,1)->as_string eq "http://web/abc"; + print "ok 5\n"; +} + +print "not " unless $u1->abs(undef,0)->as_string eq "http:../../../../abc"; +print "ok 6\n"; |