OLD | NEW |
| (Empty) |
1 Canonicalization of host names. | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS canonicalize('http://GoOgLe.CoM/') is 'http://google.com/' | |
7 FAIL canonicalize('http://Goo%20 goo%7C|.com/') should be http://goo%20%20goo%7C
%7C.com/. Was http://Goo%20 goo%7C|.com/. | |
8 FAIL canonicalize('http://GOO goo.com/') should be http://goo%20%20goo.com/. Wa
s http://GOO goo.com/. | |
9 PASS canonicalize('http://GOOgoo.com/') is 'http://googoo.com/' | |
10 PASS canonicalize('http://www.foo。bar.com/') is 'http://www.foo.bar.com/' | |
11 FAIL canonicalize('http://zyx.com/') should be http://%EF%BF%BDzyx.com/. Was ht
tp:/. | |
12 FAIL canonicalize('http://%ef%b7%90zyx.com/') should be http://%EF%BF%BDzyx.com/
. Was http://%ef%b7%90zyx.com/. | |
13 PASS canonicalize('http://Go.com/') is 'http://go.com/' | |
14 FAIL canonicalize('http://%41.com/') should be http://a.com/. Was http://%41.com
/. | |
15 FAIL canonicalize('http://%ef%bc%85%ef%bc%94%ef%bc%91.com/') should be http://a.
com/. Was http://%ef%bc%85%ef%bc%94%ef%bc%91.com/. | |
16 PASS canonicalize('http://%00.com/') is 'http://%00.com/' | |
17 FAIL canonicalize('http://%ef%bc%85%ef%bc%90%ef%bc%90.com/') should be http://%0
0.com/. Was http://%ef%bc%85%ef%bc%90%ef%bc%90.com/. | |
18 PASS canonicalize('http://你好你好/') is 'http://xn--6qqa088eba/' | |
19 FAIL canonicalize('http://%E4%BD%A0%E5%A5%BD你好/') should be http://xn--6qqa088eb
a/. Was http://xn--%e4%bd%a0%e5%a5%bd-5g72ap39l/. | |
20 FAIL canonicalize('http://%zz%66%a/') should be http://%25zzf%25a/. Was http://%
zz%66%a/. | |
21 PASS canonicalize('http://%25/') is 'http://%25/' | |
22 PASS canonicalize('http://hello%00/') is 'http://hello%00/' | |
23 FAIL canonicalize('http://%30%78%63%30%2e%30%32%35%30.01/') should be http://192
.168.0.1/. Was http://%30%78%63%30%2e%30%32%35%30.01/. | |
24 FAIL canonicalize('http://%30%78%63%30%2e%30%32%35%30.01%2e/') should be http://
192.168.0.1/. Was http://%30%78%63%30%2e%30%32%35%30.01%2e/. | |
25 FAIL canonicalize('http://%3g%78%63%30%2e%30%32%35%30%2E.01/') should be http://
%253gxc0.0250..01/. Was http://%3g%78%63%30%2e%30%32%35%30%2e.01/. | |
26 FAIL canonicalize('http://192.168.0.1 hello/') should be http://192.168.0.1%20he
llo/. Was http://192.168.0.1 hello/. | |
27 FAIL canonicalize('http://0Xc0.0250.01/') should be http://192.168.0.1/. Was htt
p://0xc0.0250.01/. | |
28 PASS canonicalize('http://192.168.0.257/') is 'http://192.168.0.257/' | |
29 PASS canonicalize('http://[google.com]/') is 'http://[google.com]/' | |
30 FAIL canonicalize('http://т(/') should be http://xn--%28-7ed/. Was http://т(/. | |
31 PASS canonicalize('http://go\\@ogle.com/') is 'http://go/@ogle.com/' | |
32 PASS canonicalize('http://go/@ogle.com/') is 'http://go/@ogle.com/' | |
33 FAIL canonicalize('http://www.lookout.net::==80::==443::/') should be http://www
.lookout.net::%3D%3D80::%3D%3D443:/. Was http://www.lookout.net::==80::==443::/. | |
34 PASS canonicalize('http://www.lookout.net::80::443/') is 'http://www.lookout.net
::80::443/' | |
35 PASS canonicalize('http://\.//') is 'http://.//' | |
36 FAIL canonicalize('http:////:@//') should be http:////. Was http://:@//. | |
37 PASS canonicalize('http://\google.com/foo/') is 'http://google.com/foo/' | |
38 FAIL canonicalize('http://\\google.com/foo/') should be http://google.com/foo/.
Was http:/google.com/foo/. | |
39 PASS canonicalize('http:////asdf@//') is 'http://asdf@//' | |
40 PASS canonicalize('http:////:81/') is 'http://:81/' | |
41 FAIL canonicalize('http://:///') should be http://///. Was http:///. | |
42 PASS canonicalize('http://c:/') is 'http://c/' | |
43 PASS canonicalize('http://xxxx:/') is 'http://xxxx/' | |
44 PASS canonicalize('http://.:./') is 'http://.:./' | |
45 FAIL canonicalize('http://////@google.com//') should be http://google.com//. Was
http:////@google.com//. | |
46 PASS canonicalize('http://@google.com/') is 'http://google.com/' | |
47 PASS successfullyParsed is true | |
48 | |
49 TEST COMPLETE | |
50 | |
OLD | NEW |