--- AnyEvent/t/06_socket.t 2008/07/17 15:21:02 1.1 +++ AnyEvent/t/06_socket.t 2008/07/17 15:44:19 1.2 @@ -1,5 +1,5 @@ $|=1; -BEGIN { print "1..17\n" } +BEGIN { print "1..19\n" } no warnings; # nazis @@ -10,9 +10,9 @@ sub ph { my ($id, $str, $dport, $host, $port) = @_; - $str =~ s/_/ /g; + $str =~ s/_/ /g unless ref $str; - my ($h, $p) = parse_hostport $str, $dport; + my ($h, $p) = parse_hostport ref $str ? $$str : $str, $dport; print $h eq $host && $p eq $port ? "" : "not ", "ok $id # '$str,$dport' => '$h,$p' eq '$host,$port'\n"; } @@ -34,3 +34,7 @@ ph 16, qw([10.1]:80 443 10.1 80); ph 17, qw(10.1_80 443 10.1 80); +my $var = "2002:58c6:438b::10.0.0.17"; +ph 18, \$var, qw(443 2002:58c6:438b::10.0.0.17 443); +ph 19, \$var, qw(443 2002:58c6:438b::10.0.0.17 443); +