path-expected.txt revision 430b6b672341c7e8b5e4cfafaaae20315e68701b
1Canonicalization of paths. 2 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6PASS canonicalize('http://example.com/././foo') is 'http://example.com/foo' 7PASS canonicalize('http://example.com/./.foo') is 'http://example.com/.foo' 8PASS canonicalize('http://example.com/foo/.') is 'http://example.com/foo/' 9PASS canonicalize('http://example.com/foo/./') is 'http://example.com/foo/' 10PASS canonicalize('http://example.com/foo/bar/..') is 'http://example.com/foo/' 11PASS canonicalize('http://example.com/foo/bar/../') is 'http://example.com/foo/' 12PASS canonicalize('http://example.com/foo/..bar') is 'http://example.com/foo/..bar' 13PASS canonicalize('http://example.com/foo/bar/../ton') is 'http://example.com/foo/ton' 14PASS canonicalize('http://example.com/foo/bar/../ton/../../a') is 'http://example.com/a' 15PASS canonicalize('http://example.com/foo/../../..') is 'http://example.com/' 16PASS canonicalize('http://example.com/foo/../../../ton') is 'http://example.com/ton' 17FAIL canonicalize('http://example.com/foo/%2e') should be http://example.com/foo/. Was http://example.com/foo/%2e. 18FAIL canonicalize('http://example.com/foo/%2e%2') should be http://example.com/foo/.%2. Was http://example.com/foo/%2e%2. 19FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be http://example.com/..bar. Was http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar. 20FAIL canonicalize('http://example.com////../..') should be http://example.com//. Was http://example.com/. 21PASS canonicalize('http://example.com/foo') is 'http://example.com/foo' 22PASS canonicalize('http://example.com/%20foo') is 'http://example.com/%20foo' 23PASS canonicalize('http://example.com/foo%') is 'http://example.com/foo%' 24PASS canonicalize('http://example.com/foo%2') is 'http://example.com/foo%2' 25PASS canonicalize('http://example.com/foo%2zbar') is 'http://example.com/foo%2zbar' 26PASS canonicalize('http://example.com/foo%2©zbar') is 'http://example.com/foo%2%C3%82%C2%A9zbar' 27FAIL canonicalize('http://example.com/foo%41%7a') should be http://example.com/fooAz. Was http://example.com/foo%41%7a. 28FAIL canonicalize('http://example.com/foo %91') should be http://example.com/foo%09%C2%91%91. Was http://example.com/foo%C2%91%91. 29FAIL canonicalize('http://example.com/foo%00%51') should be http://example.com/foo%00Q. Was http://example.com/foo%00%51. 30PASS canonicalize('http://example.com/(%28:%3A%29)') is 'http://example.com/(%28:%3A%29)' 31PASS canonicalize('http://example.com/%3A%3a%3C%3c') is 'http://example.com/%3A%3a%3C%3c' 32FAIL canonicalize('http://example.com/foo bar') should be http://example.com/foo%09bar. Was http://example.com/foobar. 33PASS canonicalize('http://example.com\\foo\\bar') is 'http://example.com/foo/bar' 34PASS canonicalize('http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd') is 'http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd' 35PASS canonicalize('http://example.com/@asdf%40') is 'http://example.com/@asdf%40' 36PASS canonicalize('http://example.com/你好你好') is 'http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD' 37FAIL canonicalize('http://example.com/zyx') should be http://example.com/%EF%BF%BDzyx. Was http://example.com/%EF%B7%90zyx. 38PASS successfullyParsed is true 39 40TEST COMPLETE 41 42