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.3 by root, Sat Jul 18 00:05:29 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines