From: Akim Demaille Date: Tue, 18 Sep 2001 10:51:36 +0000 (+0000) Subject: * tests/Makefile.am (package.m4): New. X-Git-Tag: BISON-1_29a~15 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/3068221b5380ce21df0c9d0429fc6a3acc3baae3 * tests/Makefile.am (package.m4): New. * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'. (_AT_CHECK_CALC_ERROR): Likewise. Factor the `, ' part of verbose error messages. --- diff --git a/ChangeLog b/ChangeLog index adf7058d..be961874 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ +2001-09-18 Akim Demaille + + * tests/Makefile.am (package.m4): New. + * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'. + (_AT_CHECK_CALC_ERROR): Likewise. + Factor the `, ' part of verbose error messages. + 2001-09-18 Marc Autret - + * src/getargs.c (longopts): Declare --defines and --graph as options with optional arguments. * src/files.h: Add extern declarations. @@ -10,7 +17,7 @@ 2001-09-18 Marc Autret Turn off %{source,header}_extension feature. - + * src/files.c (compute_exts_from_gf): Update. (compute_exts_from_src): Update. (output_files): CPP-out useless code. diff --git a/tests/Makefile.am b/tests/Makefile.am index 3d8d0d27..6f0c28c1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -30,7 +30,7 @@ TESTSUITE = $(srcdir)/testsuite AUTOM4TE = autom4te AUTOTEST = $(AUTOM4TE) --language=autotest -$(srcdir)/$(TESTSUITE): $(TESTSUITE_AT) +$(srcdir)/$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp mv $@.tmp $@ @@ -49,3 +49,17 @@ check-local: atconfig atlocal $(TESTSUITE) # Run the test suite on the *installed* tree. installcheck-local: $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin + +## ------------ ## +## package.m4. ## +## ------------ ## + +package.m4: $(top_srcdir)/configure.in + { \ + echo '# Signature of the current package.'; \ + echo 'm4_define([PACKAGE_NAME], [@PACKAGE_NAME@])'; \ + echo 'm4_define([PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ + echo 'm4_define([PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ + echo 'm4_define([PACKAGE_STRING], [@PACKAGE_STRING@])'; \ + echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ + } >package.m4 diff --git a/tests/Makefile.in b/tests/Makefile.in index bc31ab44..93fc8003 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -228,7 +228,7 @@ uninstall-am: uninstall-info-am maintainer-clean-generic mostlyclean mostlyclean-generic \ uninstall uninstall-am uninstall-info-am -$(srcdir)/$(TESTSUITE): $(TESTSUITE_AT) +$(srcdir)/$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp mv $@.tmp $@ @@ -247,6 +247,16 @@ check-local: atconfig atlocal $(TESTSUITE) # Run the test suite on the *installed* tree. installcheck-local: $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin + +package.m4: $(top_srcdir)/configure.in + { \ + echo '# Signature of the current package.'; \ + echo 'm4_define([PACKAGE_NAME], [@PACKAGE_NAME@])'; \ + echo 'm4_define([PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ + echo 'm4_define([PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ + echo 'm4_define([PACKAGE_STRING], [@PACKAGE_STRING@])'; \ + echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ + } >package.m4 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/tests/calc.at b/tests/calc.at index d203e58c..c62a528a 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -262,35 +262,35 @@ m4_define([AT_DATA_CALC_Y], # _AT_CHECK_CALC(BISON-OPTIONS, INPUT) # ------------------------------------ # Run `calc' on INPUT and expect no STDOUT nor STDERR. -# If `--debug' is passed to bison, discard all the debugging traces -# preserving only the `parse errors'. Note that since there should be -# none, the `grep' will fail with exit status 1. m4_define([_AT_CHECK_CALC], [AT_DATA([[input]], [[$2 ]]) -m4_match([$1], [--debug], - [AT_CHECK([calc ./input 2>&1 >/dev/null | grep 'parse error' >&2], - [1], [], [])], - [AT_CHECK([./calc &1 >/dev/null | grep 'parse error' >&2], 0, +AT_CHECK([calc input], 0, [], [m4_match([$1], [--location], [$3: ])[]dnl parse error[]dnl -m4_match([$1], [--yyerror-verbose], [$4])[]dnl +m4_match([$1], [--yyerror-verbose], [, $4])[]dnl ])]) @@ -329,21 +329,21 @@ _AT_CHECK_CALC([$1], # Some parse errors. _AT_CHECK_CALC_ERROR([$1], [+1], [1.0:1.1], - [, unexpected `'+'']) + [unexpected `'+'']) _AT_CHECK_CALC_ERROR([$1], [1//2], [1.2:1.3], - [, unexpected `'/'', expecting `NUM' or `'-'' or `'('']) + [unexpected `'/'', expecting `NUM' or `'-'' or `'('']) _AT_CHECK_CALC_ERROR([$1], [error], [1.0:1.1], - [, unexpected `$undefined.']) + [unexpected `$undefined.']) _AT_CHECK_CALC_ERROR([$1], [1 = 2 = 3], [1.6:1.7], - [, unexpected `'='']) + [unexpected `'='']) _AT_CHECK_CALC_ERROR([$1], [ +1], [2.0:2.1], - [, unexpected `'+'']) + [unexpected `'+'']) AT_CLEANUP(calc calc.c calc.h calc.output) ])# AT_CHECK_CALC