projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33f9c05
)
testsuite: visualize line-endings in output comparison diffs
author
Marc Hoersken
<info@marc-hoersken.de>
Sun, 26 Jan 2014 09:00:14 +0000
(10:00 +0100)
committer
Marc Hoersken
<info@marc-hoersken.de>
Sun, 26 Jan 2014 09:00:14 +0000
(10:00 +0100)
tests/getpart.pm
patch
|
blob
|
history
diff --git
a/tests/getpart.pm
b/tests/getpart.pm
index 92a2378303078340afc1ba0a65c8025e9227b562..45488338fbc283e4b6ca89d1f990477ca266a755 100644
(file)
--- 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`;