| Canonicalization of URLs that start with something that may or may not be userinfo |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS canonicalize('http:@www.apple.com') is 'http://www.apple.com/' |
| PASS segments('http:@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:/@www.apple.com') is 'http://www.apple.com/' |
| PASS segments('http:/@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http://@www.apple.com') is 'http://www.apple.com/' |
| PASS segments('http://@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:a:b@www.apple.com') is 'http://a:b@www.apple.com/' |
| PASS segments('http:a:b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:/a:b@www.apple.com') is 'http://a:b@www.apple.com/' |
| PASS segments('http:/a:b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http://a:b@www.apple.com') is 'http://a:b@www.apple.com/' |
| PASS segments('http://a:b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http://@pple.com') is 'http://pple.com/' |
| PASS segments('http://@pple.com') is '["http:","pple.com","","/","",""]' |
| |
| PASS canonicalize('http::b@www.apple.com') is 'http://:b@www.apple.com/' |
| PASS segments('http::b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:/:b@www.apple.com') is 'http://:b@www.apple.com/' |
| PASS segments('http:/:b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http://:b@www.apple.com') is 'http://:b@www.apple.com/' |
| PASS segments('http://:b@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:/:@/www.apple.com') is 'http:/:@/www.apple.com' |
| PASS segments('http:/:@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://user@/www.apple.com') is 'http://user@/www.apple.com' |
| PASS segments('http://user@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:@/www.apple.com') is 'http:@/www.apple.com' |
| PASS segments('http:@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:/@/www.apple.com') is 'http:/@/www.apple.com' |
| PASS segments('http:/@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://@/www.apple.com') is 'http://@/www.apple.com' |
| PASS segments('http://@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('https:@/www.apple.com') is 'https:@/www.apple.com' |
| PASS segments('https:@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:a:b@/www.apple.com') is 'http:a:b@/www.apple.com' |
| PASS segments('http:a:b@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:/a:b@/www.apple.com') is 'http:/a:b@/www.apple.com' |
| PASS segments('http:/a:b@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://a:b@/www.apple.com') is 'http://a:b@/www.apple.com' |
| PASS segments('http://a:b@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http::@/www.apple.com') is 'http::@/www.apple.com' |
| PASS segments('http::@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:a:@www.apple.com') is 'http://a@www.apple.com/' |
| PASS segments('http:a:@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http:/a:@www.apple.com') is 'http://a@www.apple.com/' |
| PASS segments('http:/a:@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| PASS canonicalize('http://a:@www.apple.com') is 'http://a@www.apple.com/' |
| PASS segments('http://a:@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| FAIL canonicalize('http://a:b@www.@pple.com/p@th') should be http://a:b@www.@pple.com/p@th. Was http://a:b%40www.@pple.com/p@th. |
| FAIL segments('http://a:b@www.@pple.com/p@th') should be [":","","","","",""]. Was ["http:","pple.com","","/p@th","",""]. |
| |
| FAIL canonicalize('http://www.@@pple.com') should be http://www.@@pple.com. Was http://www.%40@pple.com/. |
| FAIL segments('http://www.@@pple.com') should be [":","","","","",""]. Was ["http:","pple.com","","/","",""]. |
| |
| FAIL canonicalize('http://@@pple.com') should be http://@@pple.com. Was http://%40@pple.com/. |
| FAIL segments('http://@@pple.com') should be [":","","","","",""]. Was ["http:","pple.com","","/","",""]. |
| |
| FAIL canonicalize('http://@@@pple.com') should be http://@@@pple.com. Was http://%40%40@pple.com/. |
| FAIL segments('http://@@@pple.com') should be [":","","","","",""]. Was ["http:","pple.com","","/","",""]. |
| |
| PASS canonicalize('http:@@/www.apple.com') is 'http:@@/www.apple.com' |
| PASS segments('http:@@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:/@@/www.apple.com') is 'http:/@@/www.apple.com' |
| PASS segments('http:/@@/www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://@@/www.apple.com') is 'http://@@/www.apple.com' |
| PASS segments('http://@@/www.apple.com') is '[":","","","","",""]' |
| |
| FAIL canonicalize('http:@:b@www.apple.com') should be http:@:b@www.apple.com. Was http://%40:b@www.apple.com/. |
| FAIL segments('http:@:b@www.apple.com') should be [":","","","","",""]. Was ["http:","www.apple.com","","/","",""]. |
| |
| FAIL canonicalize('http:/@:b@www.apple.com') should be http:/@:b@www.apple.com. Was http://%40:b@www.apple.com/. |
| FAIL segments('http:/@:b@www.apple.com') should be [":","","","","",""]. Was ["http:","www.apple.com","","/","",""]. |
| |
| FAIL canonicalize('http://@:b@www.apple.com') should be http://@:b@www.apple.com. Was http://%40:b@www.apple.com/. |
| FAIL segments('http://@:b@www.apple.com') should be [":","","","","",""]. Was ["http:","www.apple.com","","/","",""]. |
| |
| PASS canonicalize('http://www.@pple.com') is 'http://www.@pple.com/' |
| PASS segments('http://www.@pple.com') is '["http:","pple.com","","/","",""]' |
| |
| PASS canonicalize('http:@:www.apple.com') is 'http:@:www.apple.com' |
| PASS segments('http:@:www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http:/@:www.apple.com') is 'http:/@:www.apple.com' |
| PASS segments('http:/@:www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://@:www.apple.com') is 'http://@:www.apple.com' |
| PASS segments('http://@:www.apple.com') is '[":","","","","",""]' |
| |
| PASS canonicalize('http://:@www.apple.com') is 'http://www.apple.com/' |
| PASS segments('http://:@www.apple.com') is '["http:","www.apple.com","","/","",""]' |
| |
| FAIL canonicalize('http:@:/www.apple.com') should be http://:/www.apple.com. Was http:@:/www.apple.com. |
| FAIL segments('http:@:/www.apple.com') should be ["http:","","0","/www.apple.com","",""]. Was [":","","","","",""]. |
| |
| FAIL canonicalize('http:/@:/www.apple.com') should be http://:/www.apple.com. Was http:/@:/www.apple.com. |
| FAIL segments('http:/@:/www.apple.com') should be ["http:","","0","/www.apple.com","",""]. Was [":","","","","",""]. |
| |
| FAIL canonicalize('http://@:/www.apple.com') should be http://:/www.apple.com. Was http://@:/www.apple.com. |
| FAIL segments('http://@:/www.apple.com') should be ["http:","","0","/www.apple.com","",""]. Was [":","","","","",""]. |
| |
| FAIL canonicalize('http:@:80/www.apple.com') should be http://:80/www.apple.com. Was http:@:80/www.apple.com. |
| FAIL segments('http:@:80/www.apple.com') should be ["http:","","80","/www.apple.com","",""]. Was [":","","","","",""]. |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |