Allow negative indexing in recursive patterns
[p5sagit/p5-mst-13.2.git] / t / op / magic.t
index 54be238..294beb0 100755 (executable)
@@ -49,10 +49,11 @@ $Is_MPE      = $^O eq 'mpeix';
 $Is_miniperl = $ENV{PERL_CORE_MINITEST};
 $Is_BeOS     = $^O eq 'beos';
 
-$PERL = ($Is_NetWare            ? 'perl'   :
-        ($Is_MacOS || $Is_VMS) ? $^X      :
-        $Is_MSWin32            ? '.\perl' :
-        './perl');
+$PERL = $ENV{PERL}
+    || ($Is_NetWare           ? 'perl'   :
+       ($Is_MacOS || $Is_VMS) ? $^X      :
+       $Is_MSWin32            ? '.\perl' :
+       './perl');
 
 eval '$ENV{"FOO"} = "hi there";';      # check that ENV is inited inside eval
 # cmd.exe will echo 'variable=value' but 4nt will echo just the value
@@ -256,7 +257,7 @@ EOF
     s{\\}{/}g;
     ok((($Is_MSWin32 || $Is_os2) ? uc($_) eq uc($s1) : $_ eq $s1), " :$_:!=:$s1:");
     $_ = `$perl $script`;
-    s/\.exe//i if $Is_Dos or $Is_os2;
+    s/\.exe//i if $Is_Dos or $Is_os2 or $Is_Cygwin;
     s{./$perl}{$perl} if $Is_BeOS; # revert BeOS execvp() side-effect
     s{\\}{/}g;
     ok((($Is_MSWin32 || $Is_os2) ? uc($_) eq uc($s1) : $_ eq $s1), " :$_:!=:$s1: after `$perl $script`");