Mercurial > hg > octave-lojdl > gnulib-hg
changeset 15559:045f9cdabfe3
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 02 Sep 2011 14:13:59 +0200 |
parents | a52b485186f6 |
children | 56405c4de542 |
files | ChangeLog tests/init.sh |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-09-02 Bruno Haible <bruno@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, + AIX 7.1, IRIX 6.5 and Solaris 10. + 2011-09-01 Bruno Haible <bruno@clisp.org> strtoimax, strtoumax: Document problem on HP-UX 11.
--- 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 "$@"; }