Add tests/regression.at and tests/suite.at.

This commit is contained in:
Akim Demaille
2000-12-15 09:44:44 +00:00
parent 69b4e0c5ea
commit c95f2d781f
2 changed files with 63 additions and 0 deletions

55
tests/regression.at Normal file
View File

@@ -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.*])

8
tests/suite.at Normal file
View File

@@ -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])