]> git.saurik.com Git - bison.git/blame - tests/suite.at
Cope with CVS weird way to report warnings.
[bison.git] / tests / suite.at
CommitLineData
c95f2d78 1#! /bin/sh
19c50364 2# -*- Autoconf -*-
c95f2d78
AD
3# Validation suite for Bison.
4# Copyright 2000 Free Software Foundation, Inc.
5
6AT_INIT([bison])
7
19c50364
AD
8## ---------------------------- ##
9## Checking output file names. ##
10## ---------------------------- ##
11
6deb4447
AD
12# AT_CHECK_BISON_FLAGS(FLAGS, EXPECTED-FILES-SORTED)
13# --------------------------------------------------
14AT_DEFINE([AT_CHECK_BISON_FLAGS],
15[AT_SETUP([Output files: $1.])
19c50364
AD
16AT_DATA([foo.y],
17[[%%
18foo: {}
19]])
6deb4447 20rm -rf $2
19c50364
AD
21AT_CHECK([bison -dv foo.y $1], 0, ignore, ignore)
22AT_CHECK([ls $2 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$2])
6deb4447
AD
23rm -f $2
24AT_CLEANUP
25])
26
27AT_CHECK_BISON_FLAGS([], [foo.output foo.tab.c foo.tab.h])
28AT_CHECK_BISON_FLAGS([-o foo.c], [foo.c foo.h foo.output])
29AT_CHECK_BISON_FLAGS([-o foo.tab.c], [foo.output foo.tab.c foo.tab.h])
30AT_CHECK_BISON_FLAGS([-y], [y.output y.tab.c y.tab.h])
31AT_CHECK_BISON_FLAGS([-b bar], [bar.output bar.tab.c bar.tab.h])
19c50364 32
19c50364 33
5d3214b8 34
6deb4447
AD
35# AT_CHECK_BISON_PERCENT(GRAMMAR-OPTIONS, EXPECTED-FILES-SORTED)
36# --------------------------------------------------------------
37AT_DEFINE([AT_CHECK_BISON_PERCENT],
38[AT_SETUP([Output files: $1.])
39AT_DATA([foo.y],
40[[$1
41%defines
42%verbose
43%%
44foo: {}
45]])
46rm -rf $2
47AT_CHECK([bison foo.y], 0, ignore, ignore)
48AT_CHECK([ls $2 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$2])
49rm -f $2
50AT_CLEANUP
51])
52
53# The sames, but using the % directives.
54AT_CHECK_BISON_PERCENT([], [foo.output foo.tab.c foo.tab.h])
55# AT_CHECK_BISON_PERCENT([%output foo.c], [foo.c foo.h foo.output])
56# AT_CHECK_BISON_PERCENT([%output foo.tab.c], [foo.output foo.tab.c foo.tab.h])
57AT_CHECK_BISON_PERCENT([%yacc], [y.output y.tab.c y.tab.h])
58# AT_CHECK_BISON_PERCENT([%file_prefix bar], [bar.output bar.tab.c bar.tab.h])
5d3214b8
AD
59
60AT_INCLUDE([calc.at])
61AT_INCLUDE([regression.at])