blob: f86252e1be908e173835a6c49e56060bb6fdf2f2 [file] [log] [blame]
Test URLs that have an anchor.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS canonicalize('http://www.example.com/#hello, world') is 'http://www.example.com/#hello, world'
FAIL canonicalize('http://www.example.com/#©') should be http://www.example.com/#©. Was http://www.example.com/#%C3%82%C2%A9.
FAIL canonicalize('http://www.example.com/#𐌀ss') should be http://www.example.com/#𐌀ss. Was http://www.example.com/#%F0%90%8C%80ss.
PASS canonicalize('http://www.example.com/#%41%a') is 'http://www.example.com/#%41%a'
FAIL canonicalize('http://www.example.com/#\ud800\u597d') should be http://www.example.com/#�好. Was http://www.example.com/#%EF%BF%BD%E5%A5%BD.
FAIL canonicalize('http://www.example.com/#a\uFDD0') should be http://www.example.com/#a﷐. Was http://www.example.com/#a%EF%BF%BD.
PASS canonicalize('http://www.example.com/#asdf#qwer') is 'http://www.example.com/#asdf#qwer'
PASS canonicalize('http://www.example.com/##asdf') is 'http://www.example.com/##asdf'
PASS canonicalize('http://www.example.com/#a\nb\rc\td') is 'http://www.example.com/#abcd'
PASS successfullyParsed is true
TEST COMPLETE