From 59a76e401050b65ca8ebfc74915c54b033185e0c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 10 Oct 2001 21:59:10 +0000 Subject: Kevin Roth's fixes to make tests work on cygwin --- tests/getpart.pm | 7 ++++++- tests/httpserver.pl | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/getpart.pm b/tests/getpart.pm index 0edb6c9b5..20da14b5c 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -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 $_; } diff --git a/tests/httpserver.pl b/tests/httpserver.pl index 9e473f3c9..f5cf62cbe 100755 --- a/tests/httpserver.pl +++ b/tests/httpserver.pl @@ -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 $_; } -- cgit v1.2.3