summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-08-05 21:57:43 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-08-05 21:57:43 +0000
commit6d0cc0d743fcf15e2f42426a114c8bb442562080 (patch)
tree4ea02a5ffacade672cd095f23f9c12651ce08de2 /t
parent8d3f517adfffb573694d590afed9fde23dd83cec (diff)
downloadperl-6d0cc0d743fcf15e2f42426a114c8bb442562080.tar.gz
remove hardcoded cmd shell in testsuite
p4raw-id: //depot/perl@11590
Diffstat (limited to 't')
-rwxr-xr-xt/op/glob.t2
-rwxr-xr-xt/op/magic.t6
-rwxr-xr-xt/op/stat.t4
3 files changed, 6 insertions, 6 deletions
diff --git a/t/op/glob.t b/t/op/glob.t
index 2eb371ae35..bf96e5bc86 100755
--- a/t/op/glob.t
+++ b/t/op/glob.t
@@ -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/*>;
diff --git a/t/op/magic.t b/t/op/magic.t
index aa568a7b1a..a847ca8660 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -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") );
}
diff --git a/t/op/stat.t b/t/op/stat.t
index 20dbd9069f..088c221ed4 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -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";}