hi El Linko,
I have pasted below the output the two commands you had asked. Surprisingly perl -Iblib/lib t/heuristic.t did not give any error.
Please see if you can help me out,
Thanks,
Ranjan
perl -Iblib/lib t/abs.t :
1..45
URI->new("g:h")->abs("http://a/b/c/d;p?q") ==> "g:h"
URI->new("g:h")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 1
URI->new("g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g"
URI->new("g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 2
URI->new("./g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g"
URI->new("./g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 3
URI->new("g/")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g/"
URI->new("g/")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 4
URI->new("/g")->abs("http://a/b/c/d;p?q") ==> "http://a/g"
URI->new("/g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 5
URI->new("//g")->abs("http://a/b/c/d;p?q") ==> "http://g"
URI->new("//g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 6
URI->new("?y")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/d;p?y"
URI->new("?y")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 7
URI->new("g?y")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g?y"
URI->new("g?y")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 8
URI->new("#s")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/d;p?q#s"
URI->new("#s")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 9
URI->new("g#s")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g#s"
URI->new("g#s")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 10
URI->new("g?y#s")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g?y#s"
URI->new("g?y#s")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 11
URI->new(";x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/;x"
URI->new(";x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 12
URI->new("g;x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g;x"
URI->new("g;x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 13
URI->new("g;x?y#s")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g;x?y#s"
URI->new("g;x?y#s")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 14
URI->new(".")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/"
URI->new(".")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 15
URI->new("./")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/"
URI->new("./")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 16
URI->new("..")->abs("http://a/b/c/d;p?q") ==> "http://a/b/"
URI->new("..")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 17
URI->new("../")->abs("http://a/b/c/d;p?q") ==> "http://a/b/"
URI->new("../")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 18
URI->new("../g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/g"
URI->new("../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 19
URI->new("../..")->abs("http://a/b/c/d;p?q") ==> "http://a/"
URI->new("../..")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 20
URI->new("../../")->abs("http://a/b/c/d;p?q") ==> "http://a/"
URI->new("../../")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 21
URI->new("../../g")->abs("http://a/b/c/d;p?q") ==> "http://a/g"
URI->new("../../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 22
URI->new("<>")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/d;p?q"
URI->new("<>")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 23
URI->new("../../../g")->abs("http://a/b/c/d;p?q") ==> "http://a/../g"
URI->new("../../../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 24
URI->new("../../../../g")->abs("http://a/b/c/d;p?q") ==> "http://a/../../g"
URI->new("../../../../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 25
URI->new("/./g")->abs("http://a/b/c/d;p?q") ==> "http://a/./g"
URI->new("/./g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 26
URI->new("/../g")->abs("http://a/b/c/d;p?q") ==> "http://a/../g"
URI->new("/../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 27
URI->new("g.")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g."
URI->new("g.")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 28
URI->new(".g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/.g"
URI->new(".g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 29
URI->new("g..")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g.."
URI->new("g..")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 30
URI->new("..g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/..g"
URI->new("..g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 31
URI->new("./../g")->abs("http://a/b/c/d;p?q") ==> "http://a/b/g"
URI->new("./../g")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 32
URI->new("./g/.")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g/"
URI->new("./g/.")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 33
URI->new("g/./h")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g/h"
URI->new("g/./h")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 34
URI->new("g/../h")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/h"
URI->new("g/../h")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 35
URI->new("g;x=1/./y")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g;x=1/y"
URI->new("g;x=1/./y")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 36
URI->new("g;x=1/../y")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/y"
URI->new("g;x=1/../y")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 37
URI->new("g?y/./x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g?y/./x"
URI->new("g?y/./x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 38
URI->new("g?y/../x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g?y/../x"
URI->new("g?y/../x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 39
URI->new("g#s/./x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g#s/./x"
URI->new("g#s/./x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 40
URI->new("g#s/../x")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/g#s/../x"
URI->new("g#s/../x")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 41
URI->new("http:g")->abs("http://a/b/c/d;p?q") ==> "http:g"
not ok 42
URI->new("http:")->abs("http://a/b/c/d;p?q") ==> "http:"
not ok 43
URI->new("#foo?")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/d;p?q#foo?"
URI->new("#foo?")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 44
URI->new("?#foo")->abs("http://a/b/c/d;p?q") ==> "http://a/b/c/d;p?#foo"
URI->new("?#foo")->abs( URI->new("http://a/b/c/d;p?q"), 1)
not ok 45
In the following cases we did not get back to where we started with rel()
3: URI->new("http://a/b/c/g
", "http://a/b/c/d;p?q")->rel ==> "g" ( not "./g")
5: URI->new("http://a/g
", "http://a/b/c/d;p?q")->rel ==> "../../g" ( not "/g")
6: URI->new("http://g
", "http://a/b/c/d;p?q")->rel ==> "http://g" ( not "//g")
7: URI->new("http://a/b/c/d;p?y
", "http://a/b/c/d;p?q")->rel ==> "d;p?y" ( not "?y")
9: URI->new("http://a/b/c/d;p?q#s
", "http://a/b/c/d;p?q")->rel ==> "d;p?q#s" ( not "#s")
15: URI->new("http://a/b/c/
", "http://a/b/c/d;p?q")->rel ==> "./" ( not ".")
17: URI->new("http://a/b/
", "http://a/b/c/d;p?q")->rel ==> "../" ( not "..")
20: URI->new("http://a/
", "http://a/b/c/d;p?q")->rel ==> "../../" ( not "../..")
23: URI->new("http://a/b/c/d;p?q
", "http://a/b/c/d;p?q")->rel ==> "d;p?q" ( not "<>")
26: URI->new("http://a/./g
", "http://a/b/c/d;p?q")->rel ==> "../.././g" ( not "/./g")
27: URI->new("http://a/../g
", "http://a/b/c/d;p?q")->rel ==> "../../../g" ( not "/../g")
32: URI->new("http://a/b/g
", "http://a/b/c/d;p?q")->rel ==> "../g" ( not "./../g")
33: URI->new("http://a/b/c/g/
", "http://a/b/c/d;p?q")->rel ==> "g/" ( not "./g/.")
34: URI->new("http://a/b/c/g/h
", "http://a/b/c/d;p?q")->rel ==> "g/h" ( not "g/./h")
35: URI->new("http://a/b/c/h
", "http://a/b/c/d;p?q")->rel ==> "h" ( not "g/../h")
36: URI->new("http://a/b/c/g;x=1/y
", "http://a/b/c/d;p?q")->rel ==> "g;x=1/y" ( not "g;x=1/./y")
37: URI->new("http://a/b/c/y
", "http://a/b/c/d;p?q")->rel ==> "y" ( not "g;x=1/../y")
44: URI->new("http://a/b/c/d;p?q#foo?
", "http://a/b/c/d;p?q")->rel ==> "d;p?q#foo?" ( not "#foo?")
45: URI->new("http://a/b/c/d;p?#foo
", "http://a/b/c/d;p?q")->rel ==> "d;p?#foo" ( not "?#foo")
perl -Iblib/lib t/heuristic.t:
1..15
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
| [reply] |