This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove hardcoded cmd shell in testsuite
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 5 Aug 2001 21:57:43 +0000 (21:57 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 5 Aug 2001 21:57:43 +0000 (21:57 +0000)
p4raw-id: //depot/perl@11590

t/op/glob.t
t/op/magic.t
t/op/stat.t

index 2eb371a..bf96e5b 100755 (executable)
@@ -11,7 +11,7 @@ print "1..10\n";
 
 if ($^O eq 'MSWin32') {
   map { $files{lc($_)}++ } <op/*>;
-  map { delete $files{"op/$_"} } split /[\s\n]/, `cmd /c "dir /b /l op & dir /b /l /ah op 2>nul"`,
+  map { delete $files{"op/$_"} } split /[\s\n]/, `dir /b /l op & dir /b /l /ah op 2>nul`,
 }
 else {
   map { $files{$_}++ } <op/*>;
index aa568a7..a847ca8 100755 (executable)
@@ -32,7 +32,7 @@ $PERL = ($Is_MSWin32 ? '.\perl' : ($Is_NetWare ? 'perl' : './perl'));
 print "1..41\n";
 
 eval '$ENV{"FOO"} = "hi there";';      # check that ENV is inited inside eval
-if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; }
+if ($Is_MSWin32) { ok 1, `set FOO` eq "FOO=hi there\n"; }
 else             { ok 1, `echo \$FOO` eq "hi there\n"; }
 
 unlink 'ajslkdfpqjsjfk';
@@ -196,12 +196,12 @@ else {
        %ENV = ();
        $ENV{PATH} = $PATH;
        $ENV{PERL_DESTRUCT_LEVEL} = $PDL || 0;
-       ok 29, ($Is_MSWin32 ? (`cmd /x /c set foo 2>NUL` eq "")
+       ok 29, ($Is_MSWin32 ? (`set foo 2>NUL` eq "")
                                : (`echo \$foo` eq "\n") );
 
        $ENV{__NoNeSuCh} = "foo";
        $0 = "bar";
-       ok 30, ($Is_MSWin32 ? (`cmd /x /c set __NoNeSuCh` eq "__NoNeSuCh=foo\n")
+       ok 30, ($Is_MSWin32 ? (`set __NoNeSuCh` eq "__NoNeSuCh=foo\n")
                            : (`echo \$__NoNeSuCh` eq "foo\n") );
 }
 
index 20dbd90..088c221 100755 (executable)
@@ -93,13 +93,13 @@ else             { `touch Op.stat.tmp` }
 if (-z 'Op.stat.tmp') {print "ok 5\n";} else {print "not ok 5\n";}
 if (! -s 'Op.stat.tmp') {print "ok 6\n";} else {print "not ok 6\n";}
 
-$Is_MSWin32 ? `cmd /c echo hi > Op.stat.tmp` : `echo hi >Op.stat.tmp`;
+`echo hi >Op.stat.tmp`;
 if (! -z 'Op.stat.tmp') {print "ok 7\n";} else {print "not ok 7\n";}
 if (-s 'Op.stat.tmp') {print "ok 8\n";} else {print "not ok 8\n";}
 
 unlink 'Op.stat.tmp' or print "# unlink failed: $!\n";
 $olduid = $>;          # can't test -r if uid == 0
-$Is_MSWin32 ? `cmd /c echo hi > Op.stat.tmp` : `echo hi >Op.stat.tmp`;
+`echo hi >Op.stat.tmp`;
 chmod 0,'Op.stat.tmp';
 eval '$> = 1;';                # so switch uid (may not be implemented)
 if (!$> || $Is_Dos || $Is_Cygwin || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";}