mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
tests: beware of portability issues with diff -u
AIX 7.1 supports diff -u, but its output does not match the expected one. Reported by Bruno Haible. https://lists.gnu.org/r/bug-bison/2020-05/msg00049.html * tests/atlocal.in (DIFF_U_WORKS): New. * tests/local.at (AT_DIFF_U_CHECK): New. * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Use AT_DIFF_U_CHECK.
This commit is contained in:
@@ -83,6 +83,16 @@ set x `LC_ALL=C ls -l '$1'` &&
|
||||
## ------------- ##
|
||||
|
||||
|
||||
# AT_DIFF_U_CHECK(DIFF-ARGS, EXPECTED-DIFF)
|
||||
# -----------------------------------------
|
||||
# If diff -u works as we expect, use it, with headers stripped.
|
||||
m4_define([AT_DIFF_U_CHECK],
|
||||
[if $DIFF_U_WORKS; then
|
||||
AT_CHECK([diff -u $1 | sed -n '/^@@/,$p' | sed 's/^ $//'], [0], [$2])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AT_PERL_CHECK(PERL-ARGS, ...)
|
||||
# -----------------------------
|
||||
# If Perl is available, run this test.
|
||||
|
||||
Reference in New Issue
Block a user