1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

testsuite: visualize line-endings in output comparison diffs

This commit is contained in:
Marc Hoersken 2014-01-26 10:00:14 +01:00
parent 33f9c05082
commit 23a04863aa

View File

@ -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`;