This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Last patch needed to get Perl5.7 to build natively on VOS
[perl5.git] / t / test.pl
index 4fdbd6f..14d5334 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -368,11 +368,13 @@ sub which_perl {
                $Perl = File::Spec->catfile(File::Spec->curdir(), $perl);
            }
        }
-       
-        # Its like this.  stat on Cygwin treats 'perl' to mean 'perl.exe'
-        # but open does not.  This can get confusing, so to be safe we
-        # always put the .exe on the end on Cygwin.
-        $Perl .= $exe if $^O eq 'cygwin' && $Perl !~ /\Q$exe\E$/;
+
+       # Build up the name of the executable file from the name of
+       # the command.
+
+       if ($Perl !~ /\Q$exe\E$/i) {
+           $Perl .= $exe;
+       }
 
        warn "which_perl: cannot find $Perl from $^X" unless -f $Perl;