mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
make the diffs with 'diff -u' to make them nicer and easier to read
This commit is contained in:
parent
bea02ddebe
commit
69fc363760
@ -184,8 +184,8 @@ sub loadarray {
|
|||||||
sub showdiff {
|
sub showdiff {
|
||||||
my ($firstref, $secondref)=@_;
|
my ($firstref, $secondref)=@_;
|
||||||
|
|
||||||
my $file1=".array1";
|
my $file1=".generated";
|
||||||
my $file2=".array2";
|
my $file2=".expected";
|
||||||
|
|
||||||
open(TEMP, ">$file1");
|
open(TEMP, ">$file1");
|
||||||
for(@$firstref) {
|
for(@$firstref) {
|
||||||
@ -198,8 +198,7 @@ sub showdiff {
|
|||||||
print TEMP $_;
|
print TEMP $_;
|
||||||
}
|
}
|
||||||
close(TEMP);
|
close(TEMP);
|
||||||
|
my @out = `diff -u $file2 $file1`;
|
||||||
my @out = `diff $file1 $file2`;
|
|
||||||
|
|
||||||
unlink $file1, $file2;
|
unlink $file1, $file2;
|
||||||
return @out;
|
return @out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user