file-http-base-expected.txt revision e48d279609693b4d164199748c93ad791547c649
1Canonicalization of file URLs when the base URL is an http URL
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6FAIL canonicalize('file:c:\\foo\\bar.html') should be file:///C:/foo/bar.html. Was file://c:/foo/bar.html.
7FAIL canonicalize('  File:c|////foo\\bar.html') should be file:///C:////foo/bar.html. Was file://c|////foo/bar.html.
8FAIL canonicalize('file:') should be file:///. Was file:.
9FAIL canonicalize('file:UNChost/path') should be file://unchost/path. Was file://UNChost/path.
10FAIL canonicalize('c:\\foo\\bar') should be file:///C:/foo/bar. Was c:/foo/bar.
11FAIL canonicalize('C|/foo/bar') should be file:///C:/foo/bar. Was http://example.com/mock/C|/foo/bar.
12FAIL canonicalize('/C|\\foo\\bar') should be file:///C:/foo/bar. Was http://example.com/C|/foo/bar.
13FAIL canonicalize('//C|/foo/bar') should be file:///C:/foo/bar. Was http://C|/foo/bar.
14FAIL canonicalize('//server/file') should be file://server/file. Was http://server/file.
15FAIL canonicalize('\\\\server\\file') should be file://server/file. Was http://server/file.
16FAIL canonicalize('/\\server/file') should be file://server/file. Was http://server/file.
17FAIL canonicalize('file:c:foo/bar.html') should be file:///C:/foo/bar.html. Was file://c:foo/bar.html.
18FAIL canonicalize('file:/\\/\\C:\\\\//foo\\bar.html') should be file:///C:////foo/bar.html. Was file:////C:////foo/bar.html.
19PASS canonicalize('file:///foo/bar.txt') is 'file:///foo/bar.txt'
20FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was file:////7:////foo/bar.html.
21PASS canonicalize('file:filer/home\\me') is 'file://filer/home/me'
22FAIL canonicalize('file:///C:/foo/../../../bar.html') should be file:///C:/bar.html. Was file:///bar.html.
23FAIL canonicalize('file:///C:/asdf#\xc2') should be file:///C:/asdf#Â. Was file:///C:/asdf#%C2.
24FAIL canonicalize('file:///C:/asdf#Â') should be file:///C:/asdf#Â. Was file:///C:/asdf#%C2.
25PASS canonicalize('file:///home/me') is 'file:///home/me'
26FAIL canonicalize('file:c:\\foo\\bar.html') should be file:///c:/foo/bar.html. Was file://c:/foo/bar.html.
27FAIL canonicalize('file:c|//foo\\bar.html') should be file:///c%7C//foo/bar.html. Was file://c|//foo/bar.html.
28FAIL canonicalize('//') should be file:///. Was http:/.
29FAIL canonicalize('///') should be file:///. Was http:/.
30FAIL canonicalize('///test') should be file:///test. Was http:/test.
31FAIL canonicalize('file://test') should be file://test/. Was file://test.
32FAIL canonicalize('file://localhost') should be file://localhost/. Was file:.
33FAIL canonicalize('file://localhost/') should be file://localhost/. Was file:///.
34FAIL canonicalize('file://localhost/test') should be file://localhost/test. Was file:///test.
35PASS successfullyParsed is true
36
37TEST COMPLETE
38
39