From dc6246c5191f6228c7f3a33f56dc81c226868a99 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 6 Jan 2012 09:21:29 +0100 Subject: [PATCH] test-init.sh: correct the test for diff -u * tests/test-init.sh: Also redirect stdout to /dev/null. --- ChangeLog | 5 +++++ tests/test-init.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 781e4003c..2cb395652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-01-06 Bruno Haible + + test-init.sh: correct the test for diff -u + * tests/test-init.sh: Also redirect stdout to /dev/null. + 2012-01-05 Paul Eggert Use ', not `, for quoting output. diff --git a/tests/test-init.sh b/tests/test-init.sh index 1ed1b7991..3368a99ac 100755 --- a/tests/test-init.sh +++ b/tests/test-init.sh @@ -62,8 +62,8 @@ EOF EOF sed 's/ .*//;/^@@/d' out > k && mv k out - # Check the expected output only if compare is using diff -u. - if $(exec 2>/dev/null; diff -u out out < /dev/null); then + # Compare against expected output only if compare is using diff -u. + if (diff -u out out < /dev/null) > /dev/null 2>&1; then compare exp out || fail=1 fi case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac -- 2.11.0