]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
* src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
[bison.git] / tests / input.at
index 76e12d2d5e3d4011621893e3e1496143ca24487b..afacd20156c9e86e5aa7067b7c1581f74058ae9e 100644 (file)
@@ -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 {...}
 ]])