summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-09-02 10:51:52 +0200
committerJim Meyering <meyering@redhat.com>2011-09-02 14:08:40 +0200
commit0cefe580926e17c8781e8140bd9912795b6e21cc (patch)
treeeb593b96a33c47afef67dd1f49688b405319a05b
parent7490145dd0a0f016cfe893650e517d2bd2dc66d1 (diff)
downloadcoreutils-0cefe580926e17c8781e8140bd9912795b6e21cc.tar.xz
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.
-rw-r--r--tests/init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/init.sh b/tests/init.sh
index 460937de4..12b3ca37e 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 "$@"; }