FYI, I've just pushed this in Bruno's name: >From 0cfe1ace2814772d708260aaa8938196222afd5d Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 2 Sep 2011 14:13:59 +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. --- ChangeLog | 7 +++++++ tests/init.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f8369e..65de797 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-09-02 Bruno Haible <br...@clisp.org> + + 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. + 2011-09-01 Bruno Haible <br...@clisp.org> strtoimax, strtoumax: Document problem on HP-UX 11. diff --git a/tests/init.sh b/tests/init.sh index 0da6c1e..d3fb28c 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -208,7 +208,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 "$@"; } -- 1.7.7.rc0.362.g5a14