blob: 009da128cf3554d83571d1e6be37e7f6e74297e0 [file] [log] [blame]
Canonicalization of IPv4 addresses.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS canonicalize('http://./') is 'http://./'
PASS canonicalize('http://192.168.0.1/') is 'http://192.168.0.1/'
PASS canonicalize('http://0300.0250.00.01/') is 'http://192.168.0.1/'
PASS canonicalize('http://0xC0.0Xa8.0x0.0x1/') is 'http://192.168.0.1/'
PASS canonicalize('http://192.168.9.com/') is 'http://192.168.9.com/'
PASS canonicalize('http://19a.168.0.1/') is 'http://19a.168.0.1/'
PASS canonicalize('http://0308.0250.00.01/') is 'http://0308.0250.00.01/'
PASS canonicalize('http://0xCG.0xA8.0x0.0x1/') is 'http://0xcg.0xa8.0x0.0x1/'
PASS canonicalize('http://192/') is 'http://0.0.0.192/'
PASS canonicalize('http://0xC0a80001/') is 'http://192.168.0.1/'
PASS canonicalize('http://030052000001/') is 'http://192.168.0.1/'
PASS canonicalize('http://000030052000001/') is 'http://192.168.0.1/'
PASS canonicalize('http://192.168/') is 'http://192.0.0.168/'
PASS canonicalize('http://192.0x00A80001/') is 'http://192.168.0.1/'
PASS canonicalize('http://0xc0.052000001/') is 'http://192.168.0.1/'
PASS canonicalize('http://192.168.1/') is 'http://192.168.0.1/'
PASS canonicalize('http://192.168.0.0.1/') is 'http://192.168.0.0.1/'
PASS canonicalize('http://192.168.0.1./') is 'http://192.168.0.1/'
PASS canonicalize('http://192.168.0.1. hello/') is 'http://192.168.0.1. hello/'
PASS canonicalize('http://192.168.0.1../') is 'http://192.168.0.1../'
PASS canonicalize('http://192.168..1/') is 'http://192.168..1/'
PASS canonicalize('http://0x100.0/') is 'http://0x100.0/'
PASS canonicalize('http://0x100.0.0/') is 'http://0x100.0.0/'
PASS canonicalize('http://0x100.0.0.0/') is 'http://0x100.0.0.0/'
PASS canonicalize('http://0.0x100.0.0/') is 'http://0.0x100.0.0/'
PASS canonicalize('http://0.0.0x100.0/') is 'http://0.0.0x100.0/'
PASS canonicalize('http://0.0.0.0x100/') is 'http://0.0.0.0x100/'
PASS canonicalize('http://0.0.0x10000/') is 'http://0.0.0x10000/'
PASS canonicalize('http://0.0x1000000/') is 'http://0.0x1000000/'
PASS canonicalize('http://0x100000000/') is 'http://0x100000000/'
PASS canonicalize('http://0xFF.0/') is 'http://255.0.0.0/'
PASS canonicalize('http://0xFF.0.0/') is 'http://255.0.0.0/'
PASS canonicalize('http://0xFF.0.0.0/') is 'http://255.0.0.0/'
PASS canonicalize('http://0.0xFF.0.0/') is 'http://0.255.0.0/'
PASS canonicalize('http://0.0.0xFF.0/') is 'http://0.0.255.0/'
PASS canonicalize('http://0.0.0.0xFF/') is 'http://0.0.0.255/'
PASS canonicalize('http://0.0.0xFFFF/') is 'http://0.0.255.255/'
PASS canonicalize('http://0.0xFFFFFF/') is 'http://0.255.255.255/'
PASS canonicalize('http://0xFFFFFFFF/') is 'http://255.255.255.255/'
PASS canonicalize('http://276.256.0xf1a2.077777/') is 'http://276.256.0xf1a2.077777/'
PASS canonicalize('http://192.168.0.257/') is 'http://192.168.0.257/'
PASS canonicalize('http://192.168.0xa20001/') is 'http://192.168.0xa20001/'
PASS canonicalize('http://192.015052000001/') is 'http://192.015052000001/'
FAIL canonicalize('http://0X12C0a80001/') should be http://0x12c0a80001/. Was http://0X12C0a80001/.
PASS canonicalize('http://276.1.2/') is 'http://276.1.2/'
PASS canonicalize('http://192.168.0.1 hello/') is 'http://192.168.0.1 hello/'
PASS canonicalize('http://0000000000000300.0x00000000000000fF.00000000000000001/') is 'http://192.255.0.1/'
PASS canonicalize('http://0000000000000300.0xffffffffFFFFFFFF.3022415481470977/') is 'http://0000000000000300.0xffffffffffffffff.3022415481470977/'
PASS canonicalize('http://00000000000000000001/') is 'http://0.0.0.1/'
PASS canonicalize('http://0000000000000000100000000000000001/') is 'http://0000000000000000100000000000000001/'
PASS canonicalize('http://0.0.0.000000000000000000z/') is 'http://0.0.0.000000000000000000z/'
PASS canonicalize('http://0.0.0.100000000000000000z/') is 'http://0.0.0.100000000000000000z/'
PASS canonicalize('http://0.00.0x.0x0/') is 'http://0.0.0.0/'
PASS successfullyParsed is true
TEST COMPLETE