summaryrefslogtreecommitdiff
path: root/cpan/IO-Socket-IP/t/12port-fallback.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/IO-Socket-IP/t/12port-fallback.t')
-rw-r--r--cpan/IO-Socket-IP/t/12port-fallback.t42
1 files changed, 0 insertions, 42 deletions
diff --git a/cpan/IO-Socket-IP/t/12port-fallback.t b/cpan/IO-Socket-IP/t/12port-fallback.t
deleted file mode 100644
index 732d20eea1..0000000000
--- a/cpan/IO-Socket-IP/t/12port-fallback.t
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use Test::More tests => 1;
-
-use IO::Socket::IP;
-use Socket 1.95 qw(
- PF_INET SOCK_STREAM IPPROTO_TCP pack_sockaddr_in INADDR_ANY
- AI_PASSIVE
-);
-
-my $AI_ADDRCONFIG = eval { Socket::AI_ADDRCONFIG() } || 0;
-
-my @gai_args;
-my @gai_rets;
-
-no strict 'refs';
-no warnings 'redefine';
-
-*{"IO::Socket::IP::getaddrinfo"} = sub {
- push @gai_args, [ @_ ];
- return @{ shift @gai_rets };
-};
-
-@gai_rets = (
- [ "Service unknown" ],
- [ "", {
- family => PF_INET,
- socktype => SOCK_STREAM,
- protocol => IPPROTO_TCP,
- addr => pack_sockaddr_in( 80, INADDR_ANY )
- } ],
-);
-
-IO::Socket::IP->new( LocalPort => "zyxxyblarg(80)" );
-
-is_deeply( \@gai_args,
- [
- [ undef, "zyxxyblarg", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ],
- [ undef, "80", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ],
- ],
- '@gai_args for LocalPort => "zyxxyblarg(80)"' );