[perl #71204] diagnostics.pm suppresses 'Use of uninitialized value in range (or...
[p5sagit/p5-mst-13.2.git] / t / run / exit.t
index 986afea..02e57c6 100644 (file)
@@ -16,8 +16,7 @@ sub run {
 }
 
 BEGIN {
-    # MacOS system() doesn't have good return value
-    $numtests = ($^O eq 'VMS') ? 16 : ($^O eq 'MacOS') ? 0 : 17;
+    $numtests = ($^O eq 'VMS') ? 16 : 17;
 }
 
 
@@ -46,7 +45,6 @@ plan(tests => $numtests);
 my $native_success = 0;
    $native_success = 1 if $^O eq 'VMS';
 
-if ($^O ne 'MacOS') {
 my $exit, $exit_arg;
 
 $exit = run('exit');
@@ -57,7 +55,7 @@ is( ${^CHILD_ERROR_NATIVE}, $native_success,  'Normal exit ${^CHILD_ERROR_NATIVE
 if (!$vms_exit_mode) {
   my $posix_ok = eval { require POSIX; };
   my $wait_macros_ok = defined &POSIX::WIFEXITED;
-  eval { POSIX::WIFEXITED() };
+  eval { POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}) };
   $wait_macros_ok = 0 if $@;
   $exit = run('exit 42');
   is( $exit >> 8, 42,             'Non-zero exit' );
@@ -168,4 +166,3 @@ $exit = run("END { \$? = $exit_arg }");
 $exit_arg = (44 & 7) if $vms_exit_mode;
 
 is( $exit >> 8, $exit_arg,             'Changing $? in END block' );
-}