Home | History | Annotate | Download | only in url
      1 Canonicalization of IPv6 addresses.
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 FAIL canonicalize('http:///') should be http:. Was http:/.
      7 PASS canonicalize('http://[/') is 'http://[/'
      8 PASS canonicalize('http://[:/') is 'http://[:/'
      9 PASS canonicalize('http://]/') is 'http://]/'
     10 PASS canonicalize('http://:]/') is 'http://:]/'
     11 PASS canonicalize('http://[]/') is 'http://[]/'
     12 PASS canonicalize('http://[:]/') is 'http://[:]/'
     13 PASS canonicalize('http://2001:db8::1/') is 'http://2001:db8::1/'
     14 PASS canonicalize('http://[2001:db8::1/') is 'http://[2001:db8::1/'
     15 PASS canonicalize('http://2001:db8::1]/') is 'http://2001:db8::1]/'
     16 PASS canonicalize('http://[::]/') is 'http://[::]/'
     17 PASS canonicalize('http://[::1]/') is 'http://[::1]/'
     18 PASS canonicalize('http://[1::]/') is 'http://[1::]/'
     19 FAIL canonicalize('http://[::192.168.0.1]/') should be http://[::c0a8:1]/. Was http://[::192.168.0.1]/.
     20 FAIL canonicalize('http://[::ffff:192.168.0.1]/') should be http://[::ffff:c0a8:1]/. Was http://[::ffff:192.168.0.1]/.
     21 FAIL canonicalize('http://[000:01:02:003:004:5:6:007]/') should be http://[0:1:2:3:4:5:6:7]/. Was http://[000:01:02:003:004:5:6:007]/.
     22 FAIL canonicalize('http://[A:b:c:DE:fF:0:1:aC]/') should be http://[a:b:c:de:ff:0:1:ac]/. Was http://[A:b:c:DE:fF:0:1:aC]/.
     23 FAIL canonicalize('http://[1:0:0:2::3:0]/') should be http://[1::2:0:0:3:0]/. Was http://[1:0:0:2::3:0]/.
     24 PASS canonicalize('http://[1::2:0:0:3:0]/') is 'http://[1::2:0:0:3:0]/'
     25 PASS canonicalize('http://[::eeee:192.168.0.1]/') is 'http://[::eeee:192.168.0.1]/'
     26 PASS canonicalize('http://[2001::192.168.0.1]/') is 'http://[2001::192.168.0.1]/'
     27 PASS canonicalize('http://[1:2:192.168.0.1:5:6]/') is 'http://[1:2:192.168.0.1:5:6]/'
     28 FAIL canonicalize('http://[::ffff:192.1.2]/') should be http://[::ffff:c001:2]/. Was http://[::ffff:192.1.2]/.
     29 FAIL canonicalize('http://[::ffff:0xC0.0Xa8.0x0.0x1]/') should be http://[::ffff:c0a8:1]/. Was http://[::ffff:0xC0.0Xa8.0x0.0x1]/.
     30 FAIL canonicalize('http://[0:0::0:0:8]/') should be http://[::8]/. Was http://[0:0::0:0:8]/.
     31 PASS canonicalize('http://[2001:db8::1]/') is 'http://[2001:db8::1]/'
     32 PASS canonicalize('http://[2001::db8::1]/') is 'http://[2001::db8::1]/'
     33 PASS canonicalize('http://[2001:db8:::1]/') is 'http://[2001:db8:::1]/'
     34 PASS canonicalize('http://[:::]/') is 'http://[:::]/'
     35 PASS canonicalize('http://[2001::.com]/') is 'http://[2001::.com]/'
     36 PASS canonicalize('http://[::192.168.0.0.1]/') is 'http://[::192.168.0.0.1]/'
     37 PASS canonicalize('http://[::ffff:192.168.0.0.1]/') is 'http://[::ffff:192.168.0.0.1]/'
     38 PASS canonicalize('http://[1:2:3:4:5:6:7:8:9]/') is 'http://[1:2:3:4:5:6:7:8:9]/'
     39 PASS canonicalize('http://[0:0:0:0:0:0:0:192.168.0.1]/') is 'http://[0:0:0:0:0:0:0:192.168.0.1]/'
     40 PASS canonicalize('http://[1:2:3:4:5:6::192.168.0.1]/') is 'http://[1:2:3:4:5:6::192.168.0.1]/'
     41 FAIL canonicalize('http://[1:2:3:4:5:6::8]/') should be http://[1:2:3:4:5:6:0:8]/. Was http://[1:2:3:4:5:6::8]/.
     42 PASS canonicalize('http://[1:2:3:4:5:6:7:8:]/') is 'http://[1:2:3:4:5:6:7:8:]/'
     43 PASS canonicalize('http://[1:2:3:4:5:6:192.168.0.1:]/') is 'http://[1:2:3:4:5:6:192.168.0.1:]/'
     44 PASS canonicalize('http://[-1:2:3:4:5:6:7:8]/') is 'http://[-1:2:3:4:5:6:7:8]/'
     45 FAIL canonicalize('http://[1::%1]/') should be http://[1::%251]/. Was http://[1::%1]/.
     46 FAIL canonicalize('http://[1::%eth0]/') should be http://[1::%25eth0]/. Was http://[1::%eth0]/.
     47 FAIL canonicalize('http://[1::%]/') should be http://[1::%25]/. Was http://[1::%]/.
     48 FAIL canonicalize('http://[%]/') should be http://[%25]/. Was http://[%]/.
     49 FAIL canonicalize('http://[::%:]/') should be http://[::%25:]/. Was http://[::%:]/.
     50 PASS canonicalize('http://[:0:0::0:0:8]/') is 'http://[:0:0::0:0:8]/'
     51 PASS canonicalize('http://[0:0::0:0:8:]/') is 'http://[0:0::0:0:8:]/'
     52 PASS canonicalize('http://[:0:0::0:0:8:]/') is 'http://[:0:0::0:0:8:]/'
     53 PASS canonicalize('http://[::192.168..1]/') is 'http://[::192.168..1]/'
     54 FAIL canonicalize('http://[::1 hello]/') should be http://[::1%20hello]/. Was http://[::1 hello]/.
     55 PASS successfullyParsed is true
     56 
     57 TEST COMPLETE
     58 
     59