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/*>;
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';
%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") );
}
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";}