7 my $uri = URI->new("http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html");
9 print "not " unless $uri->as_string eq "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html";
12 print "not " unless $uri->host eq "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]";
15 print "not " unless $uri->host_port eq "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80";
18 print "not " unless $uri->port eq "80";
22 print "not " unless $uri->as_string eq "http://host:80/index.html";
25 $uri = URI->new("ftp://ftp:@[3ffe:2a00:100:7031::1]");
26 print "not " unless $uri->as_string eq "ftp://ftp:@[3ffe:2a00:100:7031::1]";
29 print "not " unless $uri->port eq "21" && !$uri->_port;
32 print "not " unless $uri->host("ftp") eq "[3ffe:2a00:100:7031::1]";
35 print "not " unless $uri eq "ftp://ftp:\@ftp";
40 http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
41 http://[1080:0:0:0:8:800:200C:417A]/index.html
42 http://[3ffe:2a00:100:7031::1]
43 http://[1080::8:800:200C:417A]/foo
44 http://[::192.9.5.5]/ipng
45 http://[::FFFF:129.144.52.38]:80/index.html
46 http://[2010:836B:4179::836B:4179]