Kevin Roth's fixes to make tests work on cygwin
This commit is contained in:
parent
65b9c0d44d
commit
59a76e4010
@ -119,9 +119,13 @@ sub compareparts {
|
|||||||
for(1 .. $sizefirst) {
|
for(1 .. $sizefirst) {
|
||||||
my $index = $_ - 1;
|
my $index = $_ - 1;
|
||||||
if($firstref->[$index] ne $secondref->[$index]) {
|
if($firstref->[$index] ne $secondref->[$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 1+$index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,6 +136,7 @@ sub writearray {
|
|||||||
my ($filename, $arrayref)=@_;
|
my ($filename, $arrayref)=@_;
|
||||||
|
|
||||||
open(TEMP, ">$filename");
|
open(TEMP, ">$filename");
|
||||||
|
binmode(TEMP,":raw"); # cygwin fix by Kevin Roth
|
||||||
for(@$arrayref) {
|
for(@$arrayref) {
|
||||||
print TEMP $_;
|
print TEMP $_;
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,9 @@ for ( $waitedpid = 0;
|
|||||||
$testnum=0;
|
$testnum=0;
|
||||||
}
|
}
|
||||||
open(INPUT, ">>log/server.input");
|
open(INPUT, ">>log/server.input");
|
||||||
|
|
||||||
|
binmode(INPUT,":raw"); # this makes it work better on cygwin
|
||||||
|
|
||||||
for(@headers) {
|
for(@headers) {
|
||||||
print INPUT $_;
|
print INPUT $_;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user