mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Add tests/regression.at and tests/suite.at.
This commit is contained in:
55
tests/regression.at
Normal file
55
tests/regression.at
Normal 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
8
tests/suite.at
Normal 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])
|
||||
Reference in New Issue
Block a user