]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Kevin Roth's fixes to make tests work on cygwin
authorDaniel Stenberg <daniel@haxx.se>
Wed, 10 Oct 2001 21:59:10 +0000 (21:59 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 10 Oct 2001 21:59:10 +0000 (21:59 +0000)
tests/getpart.pm
tests/httpserver.pl

index 0edb6c9b5f665fa93a3cd0a4a1647ca29dcd7038..20da14b5cf511e3033f2a6428c267fd9a0ea02db 100644 (file)
@@ -119,7 +119,11 @@ sub compareparts {
  for(1 .. $sizefirst) {
      my $index = $_ - 1;
      if($firstref->[$index] ne $secondref->[$index]) {
-         return 1+$index;
+         (my $aa = $firstref->[$index]) =~ s/\r+\n$/\n/;
+         (my $bb = $secondref->[$index]) =~ s/\r+\n$/\n/;
+         if($aa ne $bb) {
+             return 1+$index;
+         }
      }
  }
  return 0;
@@ -132,6 +136,7 @@ sub writearray {
     my ($filename, $arrayref)=@_;
 
     open(TEMP, ">$filename");
+    binmode(TEMP,":raw"); # cygwin fix by Kevin Roth
     for(@$arrayref) {
         print TEMP $_;
     }
index 9e473f3c923d1ead250951f255ad7ab1392d46d0..f5cf62cbe65dfb5a0fdbebb87596292c64101e66 100755 (executable)
@@ -137,6 +137,9 @@ for ( $waitedpid = 0;
                 $testnum=0;
             }
             open(INPUT, ">>log/server.input");
+
+            binmode(INPUT,":raw"); # this makes it work better on cygwin
+
             for(@headers) {
                 print INPUT $_;
             }