coreutils
[Top][All Lists]
Advanced

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

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


From: Collin Funk
Subject: [PATCH] tests: prefer unified diffs when printing test failures
Date: Tue, 18 Aug 2026 22:18:09 -0700

* 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;
-- 
2.55.0




reply via email to

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