coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: prefer unified diffs when printing test failures


From: Bernhard Voelker
Subject: Re: [PATCH] tests: prefer unified diffs when printing test failures
Date: Wed, 19 Aug 2026 08:24:09 +0200
User-agent: Mozilla Thunderbird

On 8/19/26 07:18, Collin Funk wrote:
* tests/Coreutils.pm (_compare_files): Use 'diff -u' instead of
'diff -c'.
---
  tests/Coreutils.pm | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index e396d93a4..fca22a670 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -141,7 +141,7 @@ sub _compare_files ($$$$$)
        warn "$program_name: test $test_name: ${info}mismatch, comparing "
          . "$expected (expected) and $actual (actual)\n";
        # Ignore any failure, discard stderr.
-      system "diff -c $expected $actual 2>/dev/null";
+      system "diff -u $expected $actual 2>/dev/null";
      }
return $differ;

Do the diff tools on all supported platforms support unified diffs meanwhile?
At least on the reachable hosts on CFARM, now all seem to support 'diff -u'.

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]