ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/06_socket.t
(Generate patch)

Comparing AnyEvent/t/06_socket.t (file contents):
Revision 1.1 by root, Thu Jul 17 15:21:02 2008 UTC vs.
Revision 1.2 by root, Thu Jul 17 15:44:19 2008 UTC

1$|=1; 1$|=1;
2BEGIN { print "1..17\n" } 2BEGIN { print "1..19\n" }
3 3
4no warnings; # nazis 4no warnings; # nazis
5 5
6use AnyEvent::Socket; 6use AnyEvent::Socket;
7 7
8print "ok 1\n"; 8print "ok 1\n";
9 9
10sub ph { 10sub ph {
11 my ($id, $str, $dport, $host, $port) = @_; 11 my ($id, $str, $dport, $host, $port) = @_;
12 12
13 $str =~ s/_/ /g; 13 $str =~ s/_/ /g unless ref $str;
14 14
15 my ($h, $p) = parse_hostport $str, $dport; 15 my ($h, $p) = parse_hostport ref $str ? $$str : $str, $dport;
16 16
17 print $h eq $host && $p eq $port ? "" : "not ", "ok $id # '$str,$dport' => '$h,$p' eq '$host,$port'\n"; 17 print $h eq $host && $p eq $port ? "" : "not ", "ok $id # '$str,$dport' => '$h,$p' eq '$host,$port'\n";
18} 18}
19 19
20ph 2, ""; 20ph 2, "";
32ph 14, qw(::1_smtp 443 ::1 smtp); 32ph 14, qw(::1_smtp 443 ::1 smtp);
33ph 15, qw([www.linux.org]_80 443 www.linux.org 80); 33ph 15, qw([www.linux.org]_80 443 www.linux.org 80);
34ph 16, qw([10.1]:80 443 10.1 80); 34ph 16, qw([10.1]:80 443 10.1 80);
35ph 17, qw(10.1_80 443 10.1 80); 35ph 17, qw(10.1_80 443 10.1 80);
36 36
37my $var = "2002:58c6:438b::10.0.0.17";
38ph 18, \$var, qw(443 2002:58c6:438b::10.0.0.17 443);
39ph 19, \$var, qw(443 2002:58c6:438b::10.0.0.17 443);
40

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines