]> git.saurik.com Git - bison.git/commitdiff
* tests/regression.m4 (%union and --defines): New test,
authorAkim Demaille <akim@epita.fr>
Fri, 17 Nov 2000 11:08:03 +0000 (11:08 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 17 Nov 2000 11:08:03 +0000 (11:08 +0000)
demonstrating a current bug in the obstack implementation.

ChangeLog
tests/regression.m4

index 3871a9ffdab5c167ff7fb619ef6cd96cd1d45638..2fc2e9444e5b7353e380ccb4d717c039363fc92e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-17  Akim Demaille  <akim@epita.fr>
+
+       * tests/regression.m4 (%union and --defines): New test,
+       demonstrating a current bug in the obstack implementation.
+
 2000-11-17  Akim Demaille  <akim@epita.fr>
 
        * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
index 6fecd6a24569355cfd162f0db163484edd6cf38b..8a00483188fa58e2e52a20c34499868399f48d4c 100644 (file)
@@ -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
 
-AT_SETUP(Duplicate string)
+## ---------------------- ##
+## %union and --defines.  ##
+## ---------------------- ##
 
-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.*])