summaryrefslogtreecommitdiff
path: root/tests/init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/init.sh')
-rw-r--r--tests/init.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/init.sh b/tests/init.sh
index 460937de..373d9d4f 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -221,8 +221,10 @@ 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 ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
+ compare () { diff -c "$@"; }
elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare () { cmp -s "$@"; }
else