summaryrefslogtreecommitdiff
path: root/cpan/IO-Socket-IP/t/06local-cross-v6.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/IO-Socket-IP/t/06local-cross-v6.t')
-rw-r--r--cpan/IO-Socket-IP/t/06local-cross-v6.t41
1 files changed, 0 insertions, 41 deletions
diff --git a/cpan/IO-Socket-IP/t/06local-cross-v6.t b/cpan/IO-Socket-IP/t/06local-cross-v6.t
deleted file mode 100644
index 9cd1e94a3f..0000000000
--- a/cpan/IO-Socket-IP/t/06local-cross-v6.t
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use Test::More;
-
-use IO::Socket::IP;
-
-eval { IO::Socket::IP->new( LocalHost => "::1" ) } or
- plan skip_all => "Unable to bind to ::1";
-
-plan tests => 12;
-
-foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
- my $testserver = IO::Socket::IP->new(
- ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
- LocalHost => "::1",
- Type => Socket->$socktype,
- ) or die "Cannot listen on PF_INET6 - $@";
-
- my $socket = IO::Socket::IP->new(
- PeerHost => "::1",
- PeerService => $testserver->sockport,
- Type => Socket->$socktype,
- ) or die "Cannot connect on PF_INET6 - $@";
-
- my $testclient = ( $socktype eq "SOCK_STREAM" ) ?
- $testserver->accept :
- do { $testserver->connect( $socket->sockname ); $testserver };
-
- is( $testclient->sockport, $socket->peerport, "\$testclient->sockport for $socktype" );
- is( $testclient->peerport, $socket->sockport, "\$testclient->peerport for $socktype" );
-
- is( $testclient->sockhost, $socket->peerhost, "\$testclient->sockhost for $socktype" );
- is( $testclient->peerhost, $socket->sockhost, "\$testclient->peerhost for $socktype" );
-
- $socket->write( "Request\n" );
- is( $testclient->getline, "Request\n", "\$socket to \$testclient for $socktype" );
-
- $testclient->write( "Response\n" );
- is( $socket->getline, "Response\n", "\$testclient to \$socket for $socktype" );
-}