From c2683e5b58261f420aaecd9a86015387c61e19e7 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 19 Jan 2014 10:39:00 +0100 Subject: [PATCH] tests: Save diff -u between expected and actual output "diff -q" isn't blessed by POSIX anyway. Neither is -u, but it should be widely available. -c is blessed, but I find its output hard to read. Signed-off-by: Markus Armbruster --- tests/test-common.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test-common.sh b/tests/test-common.sh index 9ab3bda3..6a5d564a 100644 --- a/tests/test-common.sh +++ b/tests/test-common.sh @@ -163,7 +163,7 @@ end_test () cmp_out() { - local opt exp act nrm msg ret=0 + local opt exp act nrm ret=0 for i do case "$i" in @@ -175,7 +175,7 @@ cmp_out() act="sandbox/$i" nrm="sandbox/normalized-${i##*/}" perl "$srcdir"/tests/normalize.pl $opt "$act" >"$nrm" - if msg=`diff -q "$exp" "$nrm"` + if diff -u "$exp" "$nrm" >"$nrm.diff" then echo "$i OK" elif [ "$EMPIRE_CHECK_ACCEPT" ] @@ -185,7 +185,6 @@ cmp_out() else ret=$? echo "$i FAIL" - echo $msg fi done return $ret