This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
HAS_HAS WAS NOW HAS
[perl5.git] / lib / subs.t
index 2f684b4..92f4302 100644 (file)
@@ -14,9 +14,10 @@ print "1..", scalar @prgs, "\n";
 my $Is_VMS = $^O eq 'VMS';
 my $Is_MSWin32 = $^O eq 'MSWin32';
 my $Is_NetWare = $^O eq 'NetWare';
+my $Is_MacOS = $^O eq 'MacOS';
 my $tmpfile = "tmp0000";
 my $i = 0 ;
-1 while -f ++$tmpfile;
+1 while -e ++$tmpfile;
 END {  if ($tmpfile) { 1 while unlink $tmpfile} }
 
 for (@prgs){
@@ -47,11 +48,13 @@ for (@prgs){
     print TEST $prog,"\n";
     close TEST;
     my $results = $Is_VMS ?
-                  `./perl $switch $tmpfile 2>&1` :
+                     `./perl $switch $tmpfile 2>&1` :
                  $Is_MSWin32 ?
-                  `.\\perl -I../lib $switch $tmpfile 2>&1` :
+                     `.\\perl -I../lib $switch $tmpfile 2>&1` :
                  $Is_NetWare ?
-                  `perl -I../lib $switch $tmpfile 2>&1` :
+                     `perl -I../lib $switch $tmpfile 2>&1` :
+                 $Is_MacOS ?
+                     `$^X -I::lib -MMac::err=unix $switch $tmpfile` :
                   `./perl $switch $tmpfile 2>&1`;
     my $status = $?;
     $results =~ s/\n+$//;