mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 18:23:03 +00:00
tests: beware of portability issues with wc
On macOS, wc -l always prepends the result with a tab, even when fed by stdin. But anyway, we should have used `grep -c -v`, which appears to be portable according to Autoconf's "Limitations of Usual Tools" section. Reported by Denis Excoffier. https://lists.gnu.org/r/bug-bison/2020-04/msg00009.html * tests/calc.at (_AT_CHECK_CALC): Use grep's -c instead.
This commit is contained in:
@@ -763,8 +763,8 @@ AT_JAVA_IF(
|
||||
[AT_PARSER_CHECK([calc input], 0, [AT_PARAM_IF([m4_n([$3])])], [stderr])])
|
||||
AT_LANG_MATCH([c\|c++\|java],
|
||||
[AT_GLR_IF([],
|
||||
[AT_CHECK([grep -v 'Return for a new token:' stderr | wc -l],
|
||||
[0],
|
||||
[AT_CHECK([grep -c -v 'Return for a new token:' stderr],
|
||||
[ignore],
|
||||
[m4_n([AT_DEBUG_IF([$4], [0])])])])])
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user