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.
This commit is contained in:
Pádraig Brady committed 2015-11-25 15:12:37 +00:00
1 parent 34f20fcc4a
commit f0d963da29
1 file changed
+1 -1
+1 -1
View File
@@ -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 "$@"; }