cwd.t wasn't running all the tests because cmd.exe wasn't
Gurusamy Sarathy [Thu, 25 Apr 2002 18:19:32 +0000 (18:19 +0000)]
being found properly

p4raw-id: //depot/perl@16165

ext/Cwd/t/cwd.t

index bcbcd17..92079c0 100644 (file)
@@ -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: {