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:
parent
33f9c05082
commit
23a04863aa
@ -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`;
|
||||
|
Loading…
Reference in New Issue
Block a user