From 98c539eeda8f9adfd22a3b2b6ece4fe1ca06b3b4 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 16 Apr 2024 11:52:44 -0400 Subject: tests: Quiet diff On Solaris/Illumos, `diff` prints "No differences encountered" if the files are the same. Guard it with `cmp -s` so we get no output for passing tests. --- tests/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/run.sh') diff --git a/tests/run.sh b/tests/run.sh index ab1ed6d..ad9c0be 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -430,7 +430,7 @@ make_xattrs() { EX_DIFF=20 # Detect colored diff support -if diff --color /dev/null /dev/null 2>/dev/null; then +if diff --color /dev/null /dev/null &>/dev/null; then DIFF="diff --color" else DIFF="diff" @@ -447,7 +447,7 @@ diff_output() { if ((UPDATE)); then cp "$OUT" "$GOLD" - else + elif ! cmp -s "$GOLD" "$OUT"; then $DIFF -u "$GOLD" "$OUT" >&$DUPERR fi } -- cgit v1.2.3