]> git.saurik.com Git - bison.git/commitdiff
Add tests/regression.at and tests/suite.at.
authorAkim Demaille <akim@epita.fr>
Fri, 15 Dec 2000 09:44:44 +0000 (09:44 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 15 Dec 2000 09:44:44 +0000 (09:44 +0000)
tests/regression.at [new file with mode: 0644]
tests/suite.at [new file with mode: 0644]

diff --git a/tests/regression.at b/tests/regression.at
new file mode 100644 (file)
index 0000000..8a00483
--- /dev/null
@@ -0,0 +1,55 @@
+#                                                        -*- Autoconf -*-
+
+cat <<EOF
+
+Regression tests.
+
+EOF
+
+
+## ------------------ ##
+## Duplicate string.  ##
+## ------------------ ##
+
+
+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 "<="
+
+%%
+exp: '(' exp ')' | NUM ;
+%%
+]])
+
+AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
+
+AT_CLEANUP([duplicate.*])
+
+
+
+## ---------------------- ##
+## %union and --defines.  ##
+## ---------------------- ##
+
+
+AT_SETUP([%union and --defines])
+
+AT_DATA([union.y],
+[%union
+{
+  int   integer;
+  char *string ;
+}
+%%
+exp: {};
+])
+
+AT_CHECK([bison --defines union.y])
+
+AT_CLEANUP([union.*])
diff --git a/tests/suite.at b/tests/suite.at
new file mode 100644 (file)
index 0000000..b21ac2c
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+# Validation suite for Bison.
+# Copyright 2000 Free Software Foundation, Inc.
+
+AT_INIT([bison])
+
+AT_INCLUDE([calc.at])
+AT_INCLUDE([regression.at])