#!./perl
BEGIN {
chdir 't' if -d 't';
print "1..0\n";
exit 0;
}
$has_alarm = $Config{d_alarm};
}
use Socket;
print "1..17\n";
$alarmed = 0;
print "ok 1\n";
'127.0.0.1' : 'localhost';
print "ok 2\n";
print "# Connected to " .
}
}
else {
print "# You're allowed to fail tests 2 and 3 if\n";
print "# the echo service has been disabled or if your\n";
print "# gethostbyname() cannot resolve your localhost.\n";
print "# 'Connection refused' indicates disabled echo service.\n";
print "# 'Interrupted system call' indicates a hanging echo service.\n";
print "# Error: $!\n";
print "ok 2 - skipped\n";
print "ok 3 - skipped\n";
}
}
else {
print "# Error: $!\n";
print "not ok 1\n";
}
print "ok 4\n";
print "ok 5\n";
print "# Connected to " .
}
}
else {
print "# You're allowed to fail tests 5 and 6 if\n";
print "# the echo service has been disabled.\n";
print "# 'Interrupted system call' indicates a hanging echo service.\n";
print "# Error: $!\n";
print "ok 5 - skipped\n";
print "ok 6 - skipped\n";
}
}
else {
print "# Error: $!\n";
print "not ok 4\n";
}
# warnings
++ $w if $_[0] =~ /^6-ARG sockaddr_in call is deprecated/ ;
} ;
$w = 0 ;
print ($w == 1 ? "not ok 7\n" : "ok 7\n") ;
print ($w == 1 ? "ok 8\n" : "not ok 8\n") ;
# Thest that whatever we give into pack/unpack_sockaddr retains
# the value thru the entire chain.
if((inet_ntoa((unpack_sockaddr_in(pack_sockaddr_in(100,inet_aton("10.250.230.10"))))[1])) eq '10.250.230.10') {
print "ok 9\n";
} else {
print "not ok 9\n";
}
{
}
print "ok 15\n";
} else {
print "not ok 15\n";
}
print (($@ =~ /^Bad arg length for Socket::sockaddr_family, length is 0, should be at least \d+/) ? "ok 16\n" : "not ok 16\n");
# see if we can handle abstract sockets
print "ok 17\n";
}
else {
$path =~ s/\0/\\0/g;
print "not ok 17\n";
}
} else {
# doesn't have abstract socket support
print "ok 17 - skipped on this platform\n";
}