--- AnyEvent/t/handle/03_http_req.t 2008/04/27 16:56:17 1.1 +++ AnyEvent/t/handle/03_http_req.t 2008/04/27 19:41:31 1.4 @@ -1,9 +1,18 @@ #!/opt/perl/bin/perl + use strict; -use Test::More tests => 2; +use Test::More; +use AnyEvent::Impl::Perl; use AnyEvent; use AnyEvent::Socket; +unless ($ENV{PERL_ANYEVENT_NET_TESTS}) { + plan skip_all => "PERL_ANYEVENT_NET_TESTS environment variable not set"; + exit 0; +} + +plan tests => 2; + my $cv = AnyEvent->condvar; my $fbytes; @@ -20,7 +29,7 @@ }, on_connect => sub { my ($ae_sock, $error) = @_; - if ($error) { diag ("connect error: $!"); return } + if ($error) { diag ("connect error: $!"); $cv->broadcast; return } $ae_sock->read (10, sub { my ($ae_sock, $data) = @_;