# Normalize the observed and expected error messages, depending upon the
# options.
# 1. Remove the traces from observed.
-egrep -v '^((Start|Enter|Read|Reduc|Shift)ing|state|Error:|Next|Discarding) ' stderr >at-stderr
+sed '/^Starting/d
+/^Entering/d
+/^Reading/d
+/^Reducing/d
+/^Shifting/d
+/^state/d
+/^Error:/d
+/^Next/d
+/^Discarding/d
+/^yydestructor:/d' stderr >at-stderr
mv at-stderr stderr
# 2. Create the reference error message.
AT_DATA([[expout]],
[14],
[2.1-2.2: parse error, unexpected '+'])
# Exercise error messages with EOF: work on an empty file.
-_AT_CHECK_CALC_ERROR([$1],
- [/dev/null],
- [4],
+_AT_CHECK_CALC_ERROR([$1], [/dev/null], [4],
[1.1-1.2: parse error, unexpected "end of file", expecting "number" or '-' or '\n' or '('])
# Exercise the error token: without it, we die at the first error,
# hence be sure i. to have several errors, ii. to test the action
# associated to `error'.
-_AT_CHECK_CALC_ERROR([$1],
- [(1 ++ 2) + (0 0) = 1],
- [82],
+_AT_CHECK_CALC_ERROR([$1], [(1 ++ 2) + (0 0) = 1], [82],
[1.5-1.6: parse error, unexpected '+', expecting "number" or '-' or '('
1.15-1.16: parse error, unexpected "number"
calc: error: 0 != 1])
# Add a studid example demonstrating that Bison can further improve the
# error message. FIXME: Fix this ridiculous message.
-_AT_CHECK_CALC_ERROR([$1],
- [()],
- [21],
+_AT_CHECK_CALC_ERROR([$1], [()], [21],
[1.2-1.3: parse error, unexpected ')', expecting error or "number" or '-' or '('])
AT_CLEANUP