summaryrefslogtreecommitdiff
path: root/tests/getpart.pm
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-10 21:59:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-10 21:59:10 +0000
commit59a76e401050b65ca8ebfc74915c54b033185e0c (patch)
treea64d7dae049653103dfcd099ceeeb149989a2620 /tests/getpart.pm
parent65b9c0d44df8e72d262cb8f0b942709570b061ac (diff)
downloadgnurl-59a76e401050b65ca8ebfc74915c54b033185e0c.tar.gz
gnurl-59a76e401050b65ca8ebfc74915c54b033185e0c.tar.bz2
gnurl-59a76e401050b65ca8ebfc74915c54b033185e0c.zip
Kevin Roth's fixes to make tests work on cygwin
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r--tests/getpart.pm7
1 files changed, 6 insertions, 1 deletions
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 $_;
}