From: Marc Hoersken Date: Sun, 26 Jan 2014 09:00:14 +0000 (+0100) Subject: testsuite: visualize line-endings in output comparison diffs X-Git-Tag: curl-7_35_0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23a04863aa40d3576a063cf8ec4894c1d879b442;p=curl testsuite: visualize line-endings in output comparison diffs --- diff --git a/tests/getpart.pm b/tests/getpart.pm index 92a237830..45488338f 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -264,13 +264,21 @@ sub showdiff { open(TEMP, ">$file1"); for(@$firstref) { - print TEMP $_; + my $l = $_; + $l =~ s/\r/[CR]/g; + $l =~ s/\n/[LF]/g; + print TEMP $l; + print TEMP "\n"; } close(TEMP); open(TEMP, ">$file2"); for(@$secondref) { - print TEMP $_; + my $l = $_; + $l =~ s/\r/[CR]/g; + $l =~ s/\n/[LF]/g; + print TEMP $l; + print TEMP "\n"; } close(TEMP); my @out = `diff -u $file2 $file1 2>/dev/null`;