summaryrefslogtreecommitdiff
path: root/ext/POSIX
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2006-07-14 18:09:40 +0000
committerCraig A. Berry <craigberry@mac.com>2006-07-14 18:09:40 +0000
commit525488d5ffae78b6a8d844321ca081857707856a (patch)
treeda8f355969f62f33706be7c9a03031412730fc9f /ext/POSIX
parent45552c86ce82387c803bebecc310f9b2e717f52c (diff)
downloadperl-525488d5ffae78b6a8d844321ca081857707856a.tar.gz
Make sysconf tests handle unimplemented success indications
for the benefit of Mac OS X and VMS. p4raw-id: //depot/perl@28574
Diffstat (limited to 'ext/POSIX')
-rw-r--r--ext/POSIX/t/sysconf.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/POSIX/t/sysconf.t b/ext/POSIX/t/sysconf.t
index cf04fb5e5e..68630fdef8 100644
--- a/ext/POSIX/t/sysconf.t
+++ b/ext/POSIX/t/sysconf.t
@@ -153,11 +153,12 @@ END {
# testing sysconf()
for my $constant (@sys_consts) {
SKIP: {
- skip "Saved IDs broken on Mac OS X (Perl #24122)", 3
- if $^O eq 'darwin' && $constant eq '_SC_SAVED_IDS';
+ $! = 0;
$r = eval { sysconf( eval "$constant()" ) };
+ my $s = defined($r) || $! == 0;
is( $@, '', "calling sysconf($constant)" );
- ok( defined $r, "\tchecking that the returned value is defined: $r" );
+ ok( $s, "\tchecking that the returned value is defined or that errno is clear: $r $!" );
+ skip "$constant not implemented on $^O", 1 if $s && !defined($r);
ok( looks_like_number($r), "\tchecking that the returned value looks like a number" );
}
}