| Test resolution of relative Windows-like URLs. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| PASS canonicalize('http://host/') is 'http://host/' |
| PASS canonicalize('bar') is 'file:///C:/bar' |
| PASS canonicalize('../../../bar.html') is 'file:///C:/bar.html' |
| PASS canonicalize('/../bar.html') is 'file:///C:/bar.html' |
| FAIL canonicalize('\\\\another\\path') should be . Was file://another/path. |
| PASS canonicalize('//c:/foo') is 'file:///C:/foo' |
| PASS canonicalize('//localhost/c:/foo') is 'file:///C:/foo' |
| FAIL canonicalize('c:') should be . Was file:///C:. |
| FAIL canonicalize('c:/foo') should be . Was file:///C:/foo. |
| FAIL canonicalize('c:\\foo') should be . Was file:///C:/foo. |
| PASS canonicalize('/z:/bar') is 'file:///Z:/bar' |
| PASS canonicalize('/bar') is 'file:///C:/bar' |
| PASS canonicalize('/bar') is 'file:///C:/bar' |
| PASS canonicalize('/bar') is 'file:///C:/bar' |
| PASS canonicalize('//somehost/path') is 'file://somehost/path' |
| PASS canonicalize('/\\//somehost/path') is 'file://somehost/path' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |