mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: init.sh: support any non-GNU diff
* tests/init.sh (compare): If "diff -c" is supported but "diff -u" is not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1, Solaris 8.
This commit is contained in:
1 parent
9bb92a4db1
commit
a4fa14849a
1 file changed
+2
@@ -223,6 +223,8 @@ cleanup_ () { :; }
|
||||
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user