Mercurial > hg > octave-nkf > gnulib-hg
changeset 16237:5bfc1b7e2734
test-init.sh: correct the test for diff -u
* tests/test-init.sh: Also redirect stdout to /dev/null.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 06 Jan 2012 09:21:29 +0100 |
parents | 8d0c35a0ae1d |
children | e9c8714bdbbc |
files | ChangeLog tests/test-init.sh |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-01-06 Bruno Haible <bruno@clisp.org> + + test-init.sh: correct the test for diff -u + * tests/test-init.sh: Also redirect stdout to /dev/null. + 2012-01-05 Paul Eggert <eggert@cs.ucla.edu> Use ', not `, for quoting output.
--- 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