X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e9955c83734d0a545d7822a1feb9c4a8038a62cb..12bebc0445dd46e15376edced8596bae96be78b6:/tests/calc.at?ds=sidebyside diff --git a/tests/calc.at b/tests/calc.at index 28e16f95..ec19d903 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -354,7 +354,16 @@ m4_bmatch([$1], [--debug], # 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]], @@ -420,26 +429,20 @@ _AT_CHECK_CALC_ERROR([$1], [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