ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-HTTP/t/02_ip_literals.t
Revision: 1.1
Committed: Fri May 8 21:26:16 2015 UTC (9 years, 1 month ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-2_23, rel-2_22, rel-2_25, rel-2_24, HEAD
Log Message:
*** empty log message ***

File Contents

# Content
1 BEGIN { $| = 1; print "1..23\n" }
2
3 use AnyEvent::Impl::Perl;
4
5 require AnyEvent::HTTP;
6
7 print "ok 1\n";
8
9 my $t = 2;
10
11 for my $auth (qw(
12 0.42.42.42
13 [0.42.42.42]:81
14 [::0.42.42.42]:81
15 [::0:2]
16 [0:0::2]:80
17 [::0:2]:81
18 [0:0::2]:81
19 )) {
20 my $cv = AE::cv;
21
22 AnyEvent::HTTP::http_get ("http://$auth/", timeout => 1/128, sub {
23 print $_[1]{Status} == 599 ? "not ": "", "ok ", $t + 1, " # $_[1]{Status} $auth\n";
24 $cv->send;
25 });
26
27 print "ok ", $t, "\n";
28 $cv->recv;
29 print "ok ", $t + 2, "\n";
30
31 $t += 3;
32 }
33
34 print "ok 23\n";