Avoid potentially empty struct.
[p5sagit/p5-mst-13.2.git] / t / run / exit.t
index 2b8ba89..53ba4ea 100644 (file)
@@ -5,7 +5,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    @INC = qw(. ../lib);
 }
 
 # VMS and Windows need -e "...", most everything else works better with '
@@ -19,11 +19,14 @@ sub run {
 }
 
 BEGIN {
-    $numtests = ($^O eq 'VMS') ? 7 : 3; 
+    # MacOS system() doesn't have good return value
+    $numtests = ($^O eq 'VMS') ? 7 : ($^O eq 'MacOS') ? 0 : 3; 
 }
 
-use Test::More tests => $numtests;
+require "test.pl";
+plan(tests => $numtests);
 
+if ($^O ne 'MacOS') {
 my $exit, $exit_arg;
 
 $exit = run('exit');
@@ -65,3 +68,4 @@ $exit = run("END { \$? = $exit_arg }");
 $exit_arg = (44 & 7) if $^O eq 'VMS';  
 
 is( $exit >> 8, $exit_arg,             'Changing $? in END block' );
+}