| OLD | NEW |
| (Empty) |
| 1 Canonicalization of paths. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 PASS canonicalize('http://example.com/././foo') is 'http://example.com/foo' | |
| 7 PASS canonicalize('http://example.com/./.foo') is 'http://example.com/.foo' | |
| 8 PASS canonicalize('http://example.com/foo/.') is 'http://example.com/foo/' | |
| 9 PASS canonicalize('http://example.com/foo/./') is 'http://example.com/foo/' | |
| 10 PASS canonicalize('http://example.com/foo/bar/..') is 'http://example.com/foo/' | |
| 11 PASS canonicalize('http://example.com/foo/bar/../') is 'http://example.com/foo/' | |
| 12 PASS canonicalize('http://example.com/foo/..bar') is 'http://example.com/foo/..b
ar' | |
| 13 PASS canonicalize('http://example.com/foo/bar/../ton') is 'http://example.com/fo
o/ton' | |
| 14 PASS canonicalize('http://example.com/foo/bar/../ton/../../a') is 'http://exampl
e.com/a' | |
| 15 PASS canonicalize('http://example.com/foo/../../..') is 'http://example.com/' | |
| 16 PASS canonicalize('http://example.com/foo/../../../ton') is 'http://example.com/
ton' | |
| 17 FAIL canonicalize('http://example.com/foo/%2e') should be http://example.com/foo
/. Was http://example.com/foo/%2e. | |
| 18 FAIL canonicalize('http://example.com/foo/%2e%2') should be http://example.com/f
oo/.%2. Was http://example.com/foo/%2e%2. | |
| 19 FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be h
ttp://example.com/..bar. Was http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar. | |
| 20 PASS canonicalize('http://example.com////../..') is 'http://example.com//' | |
| 21 PASS canonicalize('http://example.com/foo/bar//../..') is 'http://example.com/fo
o/' | |
| 22 PASS canonicalize('http://example.com/foo/bar//..') is 'http://example.com/foo/b
ar/' | |
| 23 PASS canonicalize('http://example.com/foo/bar/..') is 'http://example.com/foo/' | |
| 24 PASS canonicalize('http://example.com/foo') is 'http://example.com/foo' | |
| 25 PASS canonicalize('http://example.com/%20foo') is 'http://example.com/%20foo' | |
| 26 PASS canonicalize('http://example.com/foo%') is 'http://example.com/foo%' | |
| 27 PASS canonicalize('http://example.com/foo%2') is 'http://example.com/foo%2' | |
| 28 PASS canonicalize('http://example.com/foo%2zbar') is 'http://example.com/foo%2zb
ar' | |
| 29 PASS canonicalize('http://example.com/foo%2©zbar') is 'http://example.com/foo%2
%C3%82%C2%A9zbar' | |
| 30 FAIL canonicalize('http://example.com/foo%41%7a') should be http://example.com/f
ooAz. Was http://example.com/foo%41%7a. | |
| 31 PASS canonicalize('http://example.com/foo %91') is 'http://example.com/fo
o%C2%91%91' | |
| 32 FAIL canonicalize('http://example.com/foo%00%51') should be http://example.com/f
oo%00Q. Was http://example.com/foo%00%51. | |
| 33 PASS canonicalize('http://example.com/(%28:%3A%29)') is 'http://example.com/(%28
:%3A%29)' | |
| 34 PASS canonicalize('http://example.com/%3A%3a%3C%3c') is 'http://example.com/%3A%
3a%3C%3c' | |
| 35 PASS canonicalize('http://example.com/foo bar') is 'http://example.com/foo
bar' | |
| 36 PASS canonicalize('http://example.com\\foo\\bar') is 'http://example.com/foo/bar
' | |
| 37 PASS canonicalize('http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd') is 'http://examp
le.com/%7Ffp3%3Eju%3Dduvgw%3Dd' | |
| 38 PASS canonicalize('http://example.com/@asdf%40') is 'http://example.com/@asdf%40
' | |
| 39 PASS canonicalize('http://example.com/你好你好') is 'http://example.com/%E4%BD%A0%E5
%A5%BD%E4%BD%A0%E5%A5%BD' | |
| 40 FAIL canonicalize('http://example.com/zyx') should be http://example.com/%EF%BF
%BDzyx. Was http://example.com/%EF%B7%90zyx. | |
| 41 PASS canonicalize('http://example.com/‥/foo') is 'http://example.com/%E2%80%A5/f
oo' | |
| 42 PASS canonicalize('http://example.com//foo') is 'http://example.com/%EF%BB%BF/f
oo' | |
| 43 PASS canonicalize('http://example.com//foo//bar') is 'http://example.com/%E2%8
0%AE/foo/%E2%80%AD/bar' | |
| 44 FAIL canonicalize('http://example.com/foo/') should be http://example.com%2Ffoo/
. Was http://example.com/foo/. | |
| 45 PASS successfullyParsed is true | |
| 46 | |
| 47 TEST COMPLETE | |
| 48 | |
| OLD | NEW |