OLD | NEW |
| (Empty) |
1 Canonicalization of IPv4 addresses. | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS canonicalize('http://./') is 'http://./' | |
7 PASS canonicalize('http://192.168.0.1/') is 'http://192.168.0.1/' | |
8 FAIL canonicalize('http://0300.0250.00.01/') should be http://192.168.0.1/. Was
http://0300.0250.00.01/. | |
9 FAIL canonicalize('http://0xC0.0Xa8.0x0.0x1/') should be http://192.168.0.1/. Wa
s http://0xc0.0xa8.0x0.0x1/. | |
10 PASS canonicalize('http://192.168.9.com/') is 'http://192.168.9.com/' | |
11 PASS canonicalize('http://19a.168.0.1/') is 'http://19a.168.0.1/' | |
12 PASS canonicalize('http://0308.0250.00.01/') is 'http://0308.0250.00.01/' | |
13 PASS canonicalize('http://0xCG.0xA8.0x0.0x1/') is 'http://0xcg.0xa8.0x0.0x1/' | |
14 FAIL canonicalize('http://192/') should be http://0.0.0.192/. Was http://192/. | |
15 FAIL canonicalize('http://0xC0a80001/') should be http://192.168.0.1/. Was http:
//0xc0a80001/. | |
16 FAIL canonicalize('http://030052000001/') should be http://192.168.0.1/. Was htt
p://030052000001/. | |
17 FAIL canonicalize('http://000030052000001/') should be http://192.168.0.1/. Was
http://000030052000001/. | |
18 FAIL canonicalize('http://192.168/') should be http://192.0.0.168/. Was http://1
92.168/. | |
19 FAIL canonicalize('http://192.0x00A80001/') should be http://192.168.0.1/. Was h
ttp://192.0x00a80001/. | |
20 FAIL canonicalize('http://0xc0.052000001/') should be http://192.168.0.1/. Was h
ttp://0xc0.052000001/. | |
21 FAIL canonicalize('http://192.168.1/') should be http://192.168.0.1/. Was http:/
/192.168.1/. | |
22 PASS canonicalize('http://192.168.0.0.1/') is 'http://192.168.0.0.1/' | |
23 FAIL canonicalize('http://192.168.0.1./') should be http://192.168.0.1/. Was htt
p://192.168.0.1./. | |
24 PASS canonicalize('http://192.168.0.1. hello/') is 'http://192.168.0.1. hello/' | |
25 PASS canonicalize('http://192.168.0.1../') is 'http://192.168.0.1../' | |
26 PASS canonicalize('http://192.168..1/') is 'http://192.168..1/' | |
27 PASS canonicalize('http://0x100.0/') is 'http://0x100.0/' | |
28 PASS canonicalize('http://0x100.0.0/') is 'http://0x100.0.0/' | |
29 PASS canonicalize('http://0x100.0.0.0/') is 'http://0x100.0.0.0/' | |
30 PASS canonicalize('http://0.0x100.0.0/') is 'http://0.0x100.0.0/' | |
31 PASS canonicalize('http://0.0.0x100.0/') is 'http://0.0.0x100.0/' | |
32 PASS canonicalize('http://0.0.0.0x100/') is 'http://0.0.0.0x100/' | |
33 PASS canonicalize('http://0.0.0x10000/') is 'http://0.0.0x10000/' | |
34 PASS canonicalize('http://0.0x1000000/') is 'http://0.0x1000000/' | |
35 PASS canonicalize('http://0x100000000/') is 'http://0x100000000/' | |
36 FAIL canonicalize('http://0xFF.0/') should be http://255.0.0.0/. Was http://0xff
.0/. | |
37 FAIL canonicalize('http://0xFF.0.0/') should be http://255.0.0.0/. Was http://0x
ff.0.0/. | |
38 FAIL canonicalize('http://0xFF.0.0.0/') should be http://255.0.0.0/. Was http://
0xff.0.0.0/. | |
39 FAIL canonicalize('http://0.0xFF.0.0/') should be http://0.255.0.0/. Was http://
0.0xff.0.0/. | |
40 FAIL canonicalize('http://0.0.0xFF.0/') should be http://0.0.255.0/. Was http://
0.0.0xff.0/. | |
41 FAIL canonicalize('http://0.0.0.0xFF/') should be http://0.0.0.255/. Was http://
0.0.0.0xff/. | |
42 FAIL canonicalize('http://0.0.0xFFFF/') should be http://0.0.255.255/. Was http:
//0.0.0xffff/. | |
43 FAIL canonicalize('http://0.0xFFFFFF/') should be http://0.255.255.255/. Was htt
p://0.0xffffff/. | |
44 FAIL canonicalize('http://0xFFFFFFFF/') should be http://255.255.255.255/. Was h
ttp://0xffffffff/. | |
45 PASS canonicalize('http://276.256.0xf1a2.077777/') is 'http://276.256.0xf1a2.077
777/' | |
46 PASS canonicalize('http://192.168.0.257/') is 'http://192.168.0.257/' | |
47 PASS canonicalize('http://192.168.0xa20001/') is 'http://192.168.0xa20001/' | |
48 PASS canonicalize('http://192.015052000001/') is 'http://192.015052000001/' | |
49 PASS canonicalize('http://0X12C0a80001/') is 'http://0x12c0a80001/' | |
50 PASS canonicalize('http://276.1.2/') is 'http://276.1.2/' | |
51 PASS canonicalize('http://192.168.0.1 hello/') is 'http://192.168.0.1 hello/' | |
52 FAIL canonicalize('http://0000000000000300.0x00000000000000fF.00000000000000001/
') should be http://192.255.0.1/. Was http://0000000000000300.0x00000000000000ff
.00000000000000001/. | |
53 PASS canonicalize('http://0000000000000300.0xffffffffFFFFFFFF.3022415481470977/'
) is 'http://0000000000000300.0xffffffffffffffff.3022415481470977/' | |
54 FAIL canonicalize('http://00000000000000000001/') should be http://0.0.0.1/. Was
http://00000000000000000001/. | |
55 PASS canonicalize('http://0000000000000000100000000000000001/') is 'http://00000
00000000000100000000000000001/' | |
56 PASS canonicalize('http://0.0.0.000000000000000000z/') is 'http://0.0.0.00000000
0000000000z/' | |
57 PASS canonicalize('http://0.0.0.100000000000000000z/') is 'http://0.0.0.10000000
0000000000z/' | |
58 FAIL canonicalize('http://0.00.0x.0x0/') should be http://0.0.0.0/. Was http://0
.00.0x.0x0/. | |
59 PASS successfullyParsed is true | |
60 | |
61 TEST COMPLETE | |
62 | |
OLD | NEW |