summaryrefslogtreecommitdiff
path: root/tests/calc.at
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-04-19 08:05:35 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-04-19 08:12:31 +0200
commit1d0e3ee896dd5c973138c369ae1ed73924908d18 (patch)
tree4aa011053b85452470e83c796456ad14194e9914 /tests/calc.at
parent0a64b76430618d817a33612cb98a943cd64d59bb (diff)
downloadbison-1d0e3ee896dd5c973138c369ae1ed73924908d18.tar.gz
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.
Diffstat (limited to 'tests/calc.at')
-rw-r--r--tests/calc.at4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/calc.at b/tests/calc.at
index 95a6e5e7..992b911c 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -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])])])])])
])