summaryrefslogtreecommitdiff
path: root/ext/Socket/t/Socket.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Socket/t/Socket.t')
-rw-r--r--ext/Socket/t/Socket.t20
1 files changed, 15 insertions, 5 deletions
diff --git a/ext/Socket/t/Socket.t b/ext/Socket/t/Socket.t
index aeeb2a0352..09d25f9b95 100644
--- a/ext/Socket/t/Socket.t
+++ b/ext/Socket/t/Socket.t
@@ -14,7 +14,7 @@ BEGIN {
use Socket qw(:all);
-print "1..20\n";
+print "1..21\n";
$has_echo = $^O ne 'MSWin32';
$alarmed = 0;
@@ -163,16 +163,26 @@ if ($^O eq 'linux') {
print "# got <$path>\n";
print "not ok 17\n";
}
+
+ # see if we calculate the address structure length correctly
+ if (length ($test_abstract_socket) + 2 == length $addr) {
+ print "ok 18\n";
+ } else {
+ print "# got ".(length $addr)."\n";
+ print "not ok 18\n";
+ }
+
} else {
# doesn't have abstract socket support
print "ok 17 - skipped on this platform\n";
+ print "ok 18 - skipped on this platform\n";
}
if($Config{d_inetntop} && $Config{d_inetaton}){
- print ((inet_ntop(AF_INET, inet_pton(AF_INET, "10.20.30.40")) eq "10.20.30.40") ? "ok 18\n" : "not ok 18\n");
- print ((inet_ntop(AF_INET, inet_aton("10.20.30.40")) eq "10.20.30.40") ? "ok 19\n" : "not ok 19\n");
- print (lc(inet_ntop(AF_INET6, inet_pton(AF_INET6, "2001:503:BA3E::2:30")) eq "2001:503:ba3e::2:30") ? "ok 20\n" : "not ok 20\n");
+ print ((inet_ntop(AF_INET, inet_pton(AF_INET, "10.20.30.40")) eq "10.20.30.40") ? "ok 19\n" : "not ok 19\n");
+ print ((inet_ntop(AF_INET, inet_aton("10.20.30.40")) eq "10.20.30.40") ? "ok 20\n" : "not ok 20\n");
+ print (lc(inet_ntop(AF_INET6, inet_pton(AF_INET6, "2001:503:BA3E::2:30")) eq "2001:503:ba3e::2:30") ? "ok 21\n" : "not ok 21\n");
} else {
# no IPv6
- print "ok $_ - skipped on this platform\n" for 18 .. 20;
+ print "ok $_ - skipped on this platform\n" for 19 .. 21;
}