]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: reverse args in Coreutils.pm-invoked diff, for consistency
authorJim Meyering <meyering@redhat.com>
Thu, 16 Aug 2012 06:59:27 +0000 (08:59 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 16 Aug 2012 18:14:03 +0000 (20:14 +0200)
* tests/Coreutils.pm (_compare_files): Reverse diff arguments so
that we invoke diff -c $expected $actual, which is consistent with
how init.sh-using tests invoke "compare exp out".

tests/Coreutils.pm

index 0c8bb82c4610ba7556c8654ad54f686a1ebcbba5..a0c1bba7dd4268c35cbfa3109e689d6461b0c5af 100644 (file)
@@ -130,14 +130,14 @@ sub _compare_files ($$$$$)
 {
   my ($program_name, $test_name, $in_or_out, $actual, $expected) = @_;
 
-  my $differ = compare ($expected, $actual);
+  my $differ = compare ($actual, $expected);
   if ($differ)
     {
       my $info = (defined $in_or_out ? "std$in_or_out " : '');
       warn "$program_name: test $test_name: ${info}mismatch, comparing "
-        . "$actual (actual) and $expected (expected)\n";
+        . "$expected (expected) and $actual (actual)\n";
       # Ignore any failure, discard stderr.
-      system "diff -c $actual $expected 2>/dev/null";
+      system "diff -c $expected $actual 2>/dev/null";
     }
 
   return $differ;