X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e7b8bef1b1fa6eae346c4a3ee00e897a4d6f9058..22312b71e01f67b5d0462e3d2a0ea986c88c279b:/tests/regression.at?ds=inline diff --git a/tests/regression.at b/tests/regression.at index d6c2fca3..849f526c 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -18,6 +18,29 @@ AT_BANNER([[Regression tests.]]) + +## ---------------- ## +## Braces parsing. ## +## ---------------- ## + + +AT_SETUP([braces parsing]) + +AT_DATA([input.y], +[[/* Bison used to swallow the character after `}'. */ + +%% +exp: { tests = {{{{{{{{{{}}}}}}}}}}; } +%% +]]) + +AT_CHECK([bison -v input.y -o input.c], 0, ignore, ignore) + +AT_CHECK([fgrep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore]) + +AT_CLEANUP + + ## ------------------ ## ## Duplicate string. ## ## ------------------ ## @@ -478,51 +501,6 @@ AT_CLEANUP -## ---------------------- ## -## %union and --defines. ## -## ---------------------- ## - - -AT_SETUP([%union and --defines]) - -AT_DATA([input.y], -[%union -{ - int integer; - char *string ; -} -%% -exp: {}; -]) - -AT_CHECK([bison --defines input.y]) - -AT_CLEANUP - - -## --------------------------------------- ## -## Duplicate '/' in C comments in %union ## -## --------------------------------------- ## - - -AT_SETUP([%union and C comments]) - -AT_DATA([input.y], -[%union -{ - /* The int. */ int integer; - /* The string. */ char *string ; -} -%% -exp: {}; -]) - -AT_CHECK([bison input.y -o input.c]) -AT_CHECK([fgrep '//*' input.c], [1], []) - -AT_CLEANUP - - ## ----------------- ## ## Invalid input 1. ## ## ----------------- ## @@ -584,37 +562,6 @@ AT_CLEANUP -## --------------------- ## -## Invalid CPP headers. ## -## --------------------- ## - -# AT_TEST_CPP_GUARD_H([INPUT-FILE-BASE) -# ------------------------------------- -m4_define([AT_TEST_CPP_GUARD_H], -[AT_SETUP([Invalid CPP guards: $1]) - -# Possibly create inner directories. -dirname=`AS_DIRNAME([$1])` -AS_MKDIR_P([$dirname]) - -AT_DATA([$1.y], -[%% -dummy: -]) - -AT_CHECK([bison --defines=$1.h $1.y]) - -# CPP should be happy with it. -AT_CHECK([$CC -E $1.h], 0, [ignore]) - -AT_CLEANUP -]) - -AT_TEST_CPP_GUARD_H([input/input]) -AT_TEST_CPP_GUARD_H([9foo]) - - - ## -------------- ## ## Web2c Report. ## ## -------------- ##