X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9af3fbce7c5f893ab9cd72b924e154d01f1f9190..7431029172f190eb3c5c63a8828e723276551ca6:/tests/input.at diff --git a/tests/input.at b/tests/input.at index 9c223d37..868a7cfd 100644 --- a/tests/input.at +++ b/tests/input.at @@ -1,5 +1,5 @@ # 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 @@ -20,6 +20,31 @@ AT_BANNER([[Input Processing.]]) # 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. ## ## ------------ ## @@ -32,7 +57,7 @@ exp: { $$ = $1 ; }; ]]) AT_CHECK([bison input.y], [1], [], -[[input.y:2: invalid value: $1 +[[input.y:2.6-14: invalid value: $1 ]]) AT_CLEANUP @@ -50,7 +75,7 @@ exp: { @$ = @1 ; }; ]]) AT_CHECK([bison input.y], [1], [], -[[input.y:2: invalid value: @1 +[[input.y:2.6-14: invalid value: @1 ]]) AT_CLEANUP