mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
(stringappend): Be just like strcat but allocate. (base_names): Eve out from open_files. Try to simplify the rather hairy computation of base_name and short_base_name. (open_files): Use it. * tests/suite.at (Checking output file names): New test.
38 lines
1015 B
Plaintext
38 lines
1015 B
Plaintext
#! /bin/sh
|
|
# -*- Autoconf -*-
|
|
# Validation suite for Bison.
|
|
# Copyright 2000 Free Software Foundation, Inc.
|
|
|
|
AT_INIT([bison])
|
|
|
|
AT_INCLUDE([calc.at])
|
|
AT_INCLUDE([regression.at])
|
|
|
|
|
|
## ---------------------------- ##
|
|
## Checking output file names. ##
|
|
## ---------------------------- ##
|
|
|
|
AT_SETUP([Checking output file names.])
|
|
|
|
AT_DATA([foo.y],
|
|
[[%%
|
|
foo: {}
|
|
]])
|
|
|
|
# AT_CHECK_BISON_OUTPUT(FLAGS, EXPECTED-FILES-SORTED)
|
|
# ---------------------------------------------------
|
|
AT_DEFINE([AT_CHECK_BISON_OUTPUT],
|
|
[rm -rf $2
|
|
AT_CHECK([bison -dv foo.y $1], 0, ignore, ignore)
|
|
AT_CHECK([ls $2 | sort | tr '\n' ' ' | sed 's/.$//g'], 0, [$2])
|
|
rm -f $2])
|
|
|
|
AT_CHECK_BISON_OUTPUT([], [foo.tab.c foo.tab.h foo.tab.output])
|
|
AT_CHECK_BISON_OUTPUT([-o foo.c], [foo.c foo.h foo.output])
|
|
AT_CHECK_BISON_OUTPUT([-o foo.tab.c], [foo.tab.c foo.tab.h foo.tab.output])
|
|
AT_CHECK_BISON_OUTPUT([-y], [y.tab.c y.tab.h y.tab.output])
|
|
AT_CHECK_BISON_OUTPUT([-b bar], [bar.tab.c bar.tab.h bar.tab.output])
|
|
|
|
AT_CLEANUP
|