diff options
author | Gisle Aas <gisle@aas.no> | 2002-01-14 22:35:28 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-15 14:43:04 +0000 |
commit | 2a84dff3ea9dbc3670690c13c0f8f55f391c41cc (patch) | |
tree | 30cce9520b4f9598b15a55c950bb0c484928e8ab /ext/Socket/Socket.t | |
parent | 271595ccfa2b8feb1491512173d5ac42651d16f1 (diff) | |
download | perl-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-x | ext/Socket/Socket.t | 11 |
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"); |