mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
tests: init.sh: work also with any non-GNU diff that supports -u
* tests/init.sh: Relax check for diff -u support. Rather than checking for GNU diff via --version, simply check for support for -u itself. Useful at least on OpenBSD 4.9.
This commit is contained in:
1 parent
7490145dd0
commit
0cefe58092
1 file changed
+1
-1
+1
-1
@@ -221,7 +221,7 @@ export MALLOC_PERTURB_
|
||||
# a partition, or to undo any other global state changes.
|
||||
cleanup_ () { :; }
|
||||
|
||||
if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
|
||||
if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
|
||||
compare () { diff -u "$@"; }
|
||||
elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
|
||||
compare () { cmp -s "$@"; }
|
||||
|
||||
Reference in new issue
Block a user