1 Test resolution of relative Windows-like URLs. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 PASS canonicalize('http://host/') is 'http://host/' 7 PASS canonicalize('bar') is 'file:///C:/bar' 8 FAIL canonicalize('../../../bar.html') should be file:///C:/bar.html. Was file:///bar.html. 9 FAIL canonicalize('/../bar.html') should be file:///C:/bar.html. Was file:///bar.html. 10 FAIL canonicalize('\\\\another\\path') should be . Was http://another/path. 11 FAIL canonicalize('//c:/foo') should be file:///C:/foo. Was file://c/foo. 12 FAIL canonicalize('//localhost/c:/foo') should be file:///C:/foo. Was file:///c:/foo. 13 FAIL canonicalize('c:') should be . Was c:. 14 FAIL canonicalize('c:/foo') should be . Was c:/foo. 15 FAIL canonicalize('c:\\foo') should be . Was c:/foo. 16 FAIL canonicalize('/z:/bar') should be file:///Z:/bar. Was file:///z:/bar. 17 FAIL canonicalize('/bar') should be file:///C:/bar. Was file:///bar. 18 FAIL canonicalize('/bar') should be file://localhost/C:/bar. Was file:///bar. 19 FAIL canonicalize('/bar') should be file:///C:/bar. Was file:///bar. 20 PASS canonicalize('//somehost/path') is 'file://somehost/path' 21 FAIL canonicalize('/\\//somehost/path') should be file://somehost/path. Was file:////somehost/path. 22 PASS successfullyParsed is true 23 24 TEST COMPLETE 25 26