summaryrefslogtreecommitdiff
path: root/tests/getpart.pm
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2014-01-26 10:00:14 +0100
committerMarc Hoersken <info@marc-hoersken.de>2014-01-26 10:00:14 +0100
commit23a04863aa40d3576a063cf8ec4894c1d879b442 (patch)
tree3d69dc8993dedbe7512c89623b2b68efd4d5a094 /tests/getpart.pm
parent33f9c05082545efece47ff384a1ac09459075e16 (diff)
downloadcurl-23a04863aa40d3576a063cf8ec4894c1d879b442.tar.gz
testsuite: visualize line-endings in output comparison diffs
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r--tests/getpart.pm12
1 files changed, 10 insertions, 2 deletions
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`;