From: Pádraig Brady Date: Wed, 25 Nov 2015 14:26:59 +0000 (+0000) Subject: tests: for compare_(), use cmp -s where available X-Git-Tag: v1.0~6868 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9b3899a94d9b09f3dd6cc1cef8b335d10c569b1a;p=gnulib.git tests: for compare_(), use cmp -s where available * tests/init.sh (compare_): Only fall back to cmp without the POSIX defined -s option, where this is not available. --- diff --git a/ChangeLog b/ChangeLog index 9aa8bb5827..c41b27dc8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-01 Pádraig Brady + + tests: for compare_(), use cmp -s where available + * tests/init.sh (compare_): Only fall back to cmp without + the POSIX defined -s option, where this is not available. + 2016-01-01 Paul Eggert version-etc: new year diff --git a/tests/init.sh b/tests/init.sh index 67466bfb2f..ee0802241f 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then fi } fi -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then +elif cmp -s /dev/null /dev/null 2>/dev/null; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; }