mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* tests/regression.m4 (%union and --defines): New test,
demonstrating a current bug in the obstack implementation.
This commit is contained in:
@@ -6,7 +6,13 @@ Regression tests.
|
||||
|
||||
EOF
|
||||
|
||||
AT_SETUP(Duplicate string)
|
||||
|
||||
## ------------------ ##
|
||||
## Duplicate string. ##
|
||||
## ------------------ ##
|
||||
|
||||
|
||||
AT_SETUP([Duplicate string])
|
||||
|
||||
AT_DATA([duplicate.y],
|
||||
[[/* `Bison -v' used to dump core when two tokens are defined with the same
|
||||
@@ -23,30 +29,27 @@ exp: '(' exp ')' | NUM ;
|
||||
|
||||
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
|
||||
|
||||
AT_CLEANUP(duplicate.*)
|
||||
# -*- Autoconf -*-
|
||||
AT_CLEANUP([duplicate.*])
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Regression tests.
|
||||
|
||||
EOF
|
||||
## ---------------------- ##
|
||||
## %union and --defines. ##
|
||||
## ---------------------- ##
|
||||
|
||||
AT_SETUP(Duplicate string)
|
||||
|
||||
AT_DATA([duplicate.y],
|
||||
[[/* `Bison -v' used to dump core when two tokens are defined with the same
|
||||
string, as LE and GE below. */
|
||||
|
||||
%token NUM
|
||||
%token LE "<="
|
||||
%token GE "<="
|
||||
AT_SETUP([%union and --defines])
|
||||
|
||||
AT_DATA([union.y],
|
||||
[%union
|
||||
{
|
||||
int integer;
|
||||
char *string ;
|
||||
}
|
||||
%%
|
||||
exp: '(' exp ')' | NUM ;
|
||||
%%
|
||||
]])
|
||||
exp: {};
|
||||
])
|
||||
|
||||
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
|
||||
AT_CHECK([bison --defines union.y])
|
||||
|
||||
AT_CLEANUP(duplicate.*)
|
||||
AT_CLEANUP([union.*])
|
||||
|
||||
Reference in New Issue
Block a user