summaryrefslogtreecommitdiff
path: root/ext/Socket/Socket.t
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2002-01-14 22:35:28 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-15 14:43:04 +0000
commit2a84dff3ea9dbc3670690c13c0f8f55f391c41cc (patch)
tree30cce9520b4f9598b15a55c950bb0c484928e8ab /ext/Socket/Socket.t
parent271595ccfa2b8feb1491512173d5ac42651d16f1 (diff)
downloadperl-2a84dff3ea9dbc3670690c13c0f8f55f391c41cc.tar.gz
Socket::sockaddr_family
Message-ID: <lr1ygrk7gv.fsf@caliper.activestate.com> p4raw-id: //depot/perl@14279
Diffstat (limited to 'ext/Socket/Socket.t')
-rwxr-xr-xext/Socket/Socket.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/Socket/Socket.t b/ext/Socket/Socket.t
index 94d4fb5599..ebf5a5f072 100755
--- a/ext/Socket/Socket.t
+++ b/ext/Socket/Socket.t
@@ -13,7 +13,7 @@ BEGIN {
use Socket;
-print "1..14\n";
+print "1..16\n";
if (socket(T,PF_INET,SOCK_STREAM,6)) {
print "ok 1\n";
@@ -103,3 +103,12 @@ print ((inet_ntoa(v10.20.30.40) eq "10.20.30.40") ? "ok 11\n" : "not ok 11\n");
eval { inet_ntoa(v10.20.30.400) };
print (($@ =~ /^Wide character in Socket::inet_ntoa at/) ? "ok 14\n" : "not ok 14\n");
+
+if (sockaddr_family(pack_sockaddr_in(100,inet_aton("10.250.230.10"))) == AF_INET) {
+ print "ok 15\n";
+} else {
+ print "not ok 15\n";
+}
+
+eval { sockaddr_family("") };
+print (($@ =~ /^Bad arg length for Socket::sockaddr_family, length is 0, should be at least \d+/) ? "ok 16\n" : "not ok 16\n");