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:
Theophile Ranquet
2012-12-03 11:12:07 +01:00
parent 3f5d1b2c67
commit 505ece5171
6 changed files with 254 additions and 0 deletions

View File

@@ -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: ;