From: Craig A. Berry Date: Fri, 14 Jul 2006 18:09:40 +0000 (+0000) Subject: Make sysconf tests handle unimplemented success indications X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=525488d5ffae78b6a8d844321ca081857707856a;p=p5sagit%2Fp5-mst-13.2.git Make sysconf tests handle unimplemented success indications for the benefit of Mac OS X and VMS. p4raw-id: //depot/perl@28574 --- diff --git a/ext/POSIX/t/sysconf.t b/ext/POSIX/t/sysconf.t index cf04fb5..68630fd 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" ); } }