--- curl/tests/runtests.pl      Fri Mar 26 18:01:02 2004
+++ curl-new/tests/runtests.pl  Fri Mar 26 17:43:51 2004
@@ -50,7 +50,7 @@
 my $TESTCASES="all";
 
 # To run specific test cases, set them like:
-# $TESTCASES="1 2 3 7 8";
+#$TESTCASES="200";
 
 #######################################################################
 # No variables below this point should need to be modified
@@ -662,8 +662,48 @@
 
             $curl =~ s/^(.*)(libcurl.*)/$1/g;
             $libcurl = $2;
+            if($curl =~ /mingw32/) {
 
-           if ($curl =~ /win32/)
+                # This is a windows minw32 build, we need to translate the
+                # given path to the "actual" windows path.
+
+                my @m = `mount`;
+                my $matchlen;
+                my $bestmatch;
+                my $mount;
+
+                #example mount output:
+                # C:\DOCUME~1\Temp on /tmp type user (binmode,noumount)
+                # c:\ActiveState\perl on /perl type user (binmode)
+                # C:\msys\1.0\bin on /usr/bin type user (binmode,cygexec,noumount)
+                # C:\msys\1.0\bin on /bin type user (binmode,cygexec,noumount)
+
+                foreach $mount (@m) {
+                    if( $mount =~ /(.*) on ([^ ]*) type /) {
+                        my ($mingw, $real)=($2, $1);
+                        if($pwd =~ /^$mingw/) {
+                            # the path we got from pwd starts with the path we
+                            # found on this line in the mount output
+                            my $len = length($real);
+                            if($len > $matchlen) {
+                               # we remember the match that is the longest
+                               $matchlen = $len;
+                               $bestmatch = $real;
+                            }
+                        }
+                    }
+               }
+               if(!$matchlen) {
+                   print "Serious error, can't find our \"real\" path!\n";
+               }
+               else {
+                   # now prepend the prefix from the mount command to build
+                   # our "actual path"
+                   $pwd = "$bestmatch$pwd";
+               }
+               $pwd =~ s#\\#/#g;
+           }
+           elsif ($curl =~ /win32/)
            {
                # Native Windows builds don't understand the
                # output of cygwin's pwd.  It will be

