From: Gurusamy Sarathy Date: Thu, 25 Apr 2002 18:19:32 +0000 (+0000) Subject: cwd.t wasn't running all the tests because cmd.exe wasn't X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38f5208578bbcb05898effe3959401ff7d2a5630;p=p5sagit%2Fp5-mst-13.2.git cwd.t wasn't running all the tests because cmd.exe wasn't being found properly p4raw-id: //depot/perl@16165 --- diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t index bcbcd17..92079c0 100644 --- a/ext/Cwd/t/cwd.t +++ b/ext/Cwd/t/cwd.t @@ -28,14 +28,18 @@ eval { fastcwd }; # Must find an external pwd (or equivalent) command. +my $pwd = $^O eq 'MSWin32' ? "cmd" : "pwd"; my $pwd_cmd = - ($^O eq "MSWin32" || $^O eq "NetWare") ? + ($^O eq "NetWare") ? "cd" : - (grep { -x && -f } map { "$_/pwd$Config{exe_ext}" } + (grep { -x && -f } map { "$_/$pwd$Config{exe_ext}" } split m/$Config{path_sep}/, $ENV{PATH})[0]; $pwd_cmd = 'SHOW DEFAULT' if $IsVMS; - +if ($^O eq 'MSWin32') { + $pwd_cmd =~ s,/,\\,g; + $pwd_cmd = "$pwd_cmd /c cd"; +} print "# native pwd = '$pwd_cmd'\n"; SKIP: {