# Checking the output filenames. -*- Autotest -*-
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Mostly test that we are robust to mistakes.
+
+## ----------------------- ##
+## Torturing the Scanner. ##
+## ----------------------- ##
+
+AT_SETUP([Torturing the Scanner])
+
+AT_DATA([input.y],
+[[%{
+/* This is seen in GCC: a %{ and %} in middle of a comment. */
+const char *foo = "So %{ and %} can be here.";
+%}
+/* %{ and %} can be here too. */
+
+%%
+exp: 'a';
+]])
+
+AT_CHECK([bison input.y])
+
+AT_CLEANUP
+
+
+
+
## ------------ ##
## Invalid $n. ##
## ------------ ##
]])
AT_CHECK([bison input.y], [1], [],
-[[input.y:2: invalid value: $1
+[[input.y:2.6-14: invalid value: $1
]])
AT_CLEANUP
]])
AT_CHECK([bison input.y], [1], [],
-[[input.y:2: invalid value: @1
+[[input.y:2.6-14: invalid value: @1
]])
AT_CLEANUP