X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/27622431dcbe1369cebac305a6d76ccd94ef8317..4862bdfd613f96f4ab67326e6d64db3e654aec11:/tests/input.at diff --git a/tests/input.at b/tests/input.at index 76e12d2d..afacd201 100644 --- a/tests/input.at +++ b/tests/input.at @@ -25,33 +25,17 @@ AT_BANNER([[Input Processing.]]) ## Invalid $n. ## ## ------------ ## -AT_SETUP([Invalid dollar-n]) +AT_SETUP([Invalid \$n and @n]) AT_DATA([input.y], [[%% exp: { $$ = $1 ; }; -]]) - -AT_CHECK([bison input.y], [1], [], -[[input.y:2.13-14: integer out of range: `$1' -]]) - -AT_CLEANUP - - -## ------------ ## -## Invalid @n. ## -## ------------ ## - -AT_SETUP([Invalid @n]) - -AT_DATA([input.y], -[[%% exp: { @$ = @1 ; }; ]]) AT_CHECK([bison input.y], [1], [], -[[input.y:2.13-14: integer out of range: `@1' +[[input.y:2.13-14: integer out of range: `$1' +input.y:3.13-14: integer out of range: `@1' ]]) AT_CLEANUP @@ -178,7 +162,7 @@ AT_CHECK([bison input.y], [1], [], input.y:3.7-11: first declaration input.y:10.13-17: %destructor redeclaration for foo input.y:5.13-17: first declaration -input.y:9.19-23: %printer redeclaration for foo +input.y:9.10-14: %printer redeclaration for foo input.y:10.13-17: first declaration input.y:11.1-5: %left redeclaration for foo input.y:6.1-5: first declaration @@ -200,7 +184,15 @@ AT_SETUP([Torturing the Scanner]) AT_DATA([input.y], []) AT_CHECK([bison input.y], [1], [], -[[input.y:1.1: syntax error, unexpected end of file +[[input.y:1.0: syntax error, unexpected end of file +]]) + + +AT_DATA([input.y], +[{} +]) +AT_CHECK([bison input.y], [1], [], +[[input.y:1.1-2: syntax error, unexpected {...} ]])