# HG changeset patch # User Bruno Haible # Date 1325838089 -3600 # Node ID 5bfc1b7e27348739c6f204ab2b1653ac543cf92e # Parent 8d0c35a0ae1dbd1b4ad88e560f289bcb9abdcc4d test-init.sh: correct the test for diff -u * tests/test-init.sh: Also redirect stdout to /dev/null. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/tests/test-init.sh +++ b/tests/test-init.sh @@ -62,8 +62,8 @@ 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