blob: f84c2ee0a269110c96d6a2a08d2f811e85e6c33d [file] [log] [blame]
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'
FAIL canonicalize('/bar') should be file://localhost/C:/bar. Was 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