mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: enhance existing tests with carets
* tests/actions.at: Unset value. * tests/conflicts.at: Rule useless due to conflicts. * tests/input.at: Missing terminator, unexpected end of file, command line redefinition of variable. * tests/named-refs.at: Many errors. * tests/reduce.at: Useless nonterminals and rules. * tests/regression.at: Large token.
This commit is contained in:
@@ -813,6 +813,25 @@ input.y:19.13-20.0: error: missing '}' at end of file
|
||||
input.y:20.1: error: syntax error, unexpected end of file
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-fcaret -o input.c input.y], 1, [],
|
||||
[[input.y:1.10-2.0: error: missing '"' at end of line
|
||||
%token A "a
|
||||
^^
|
||||
input.y:4.10-5.0: error: missing "'" at end of line
|
||||
%token C '1
|
||||
^^
|
||||
input.y:14.11-15.0: error: missing "'" at end of line
|
||||
%type <f> 'a
|
||||
^^
|
||||
input.y:16.11-17.0: error: missing '"' at end of line
|
||||
%type <f> "a
|
||||
^^
|
||||
input.y:19.13-20.0: error: missing '}' at end of file
|
||||
%destructor { free ($$)
|
||||
^^^^^^^^^^^
|
||||
input.y:20.1: error: syntax error, unexpected end of file
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
@@ -1045,6 +1064,18 @@ AT_BISON_CHECK([[-Dvar=cmd-d input-dg.y]], [[1]], [],
|
||||
<command line>:1: previous definition
|
||||
]])
|
||||
|
||||
AT_DATA([[input-dg.y]],
|
||||
[[%define var "gram"
|
||||
%%
|
||||
start: ;
|
||||
]])
|
||||
AT_BISON_CHECK([[-fcaret -Dvar=cmd-d input-dg.y]], [[1]], [],
|
||||
[[input-dg.y:1.9-11: error: %define variable 'var' redefined
|
||||
%define var "gram"
|
||||
^^^
|
||||
<command line>:2: previous definition
|
||||
]])
|
||||
|
||||
AT_DATA([[input-unused.y]],
|
||||
[[%%
|
||||
start: ;
|
||||
|
||||
Reference in New Issue
Block a user