From 0cefe580926e17c8781e8140bd9912795b6e21cc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 2 Sep 2011 10:51:52 +0200 Subject: [PATCH] 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. --- tests/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/init.sh b/tests/init.sh index 460937de4f..12b3ca37e1 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -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 "$@"; } -- 2.47.2