diff options
Diffstat (limited to 'ext/Cwd/t/cwd.t')
-rw-r--r-- | ext/Cwd/t/cwd.t | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t index bcbcd17b3d..92079c0b10 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: { |