aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2013-04-06 18:10:56 +0200
committerMarc Hoersken <info@marc-hoersken.de>2013-04-06 18:10:56 +0200
commite51b23c925a2721cf7c29b2b376d3d8903cfb067 (patch)
treef9c58fbec72dbb30244e51d7d04e2e59138ebca5 /tests
parent18f0ab7bd353289049ca06c4a7105473e37a8f20 (diff)
getpart.pm: Strip carriage returns to fix Windows support
Diffstat (limited to 'tests')
-rw-r--r--tests/getpart.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 92a237830..2b4abf3b1 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;