# HG changeset patch # User Bruno Haible # Date 1314965639 -7200 # Node ID 045f9cdabfe3f60fc7b9d626b7d78680137cb205 # Parent a52b485186f60759a11bb765beb106b23167393b 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, AIX 7.1, IRIX 6.5 and Solaris 10. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-09-02 Bruno Haible + + 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, + AIX 7.1, IRIX 6.5 and Solaris 10. + 2011-09-01 Bruno Haible strtoimax, strtoumax: Document problem on HP-UX 11. diff --git a/tests/init.sh b/tests/init.sh --- a/tests/init.sh +++ b/tests/init.sh @@ -208,7 +208,7 @@ # 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 "$@"; }