From: Marc Hoersken Date: Sat, 6 Apr 2013 16:10:56 +0000 (+0200) Subject: getpart.pm: Strip carriage returns to fix Windows support X-Git-Tag: upstream/7.37.1~1837 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e51b23c925a2721cf7c29b2b376d3d8903cfb067;p=platform%2Fupstream%2Fcurl.git getpart.pm: Strip carriage returns to fix Windows support --- diff --git a/tests/getpart.pm b/tests/getpart.pm index 92a2378..2b4abf3 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -213,9 +213,10 @@ sub compareparts { # we cannot compare arrays index per index since with the base64 chunks, # they may not be "evenly" distributed - # NOTE: this no longer strips off carriage returns from the arrays. Is that - # really necessary? It ruins the testing of newlines. I believe it was once - # added to enable tests on win32. + if($^O eq "MSWin32" || $^O eq "msys") { + $first =~ s/\r\n/\n/g; + $second =~ s/\r\n/\n/g; + } if($first ne $second) { return 1;