]> git.saurik.com Git - bison.git/commitdiff
* tests/Makefile.am (package.m4): New.
authorAkim Demaille <akim@epita.fr>
Tue, 18 Sep 2001 10:51:36 +0000 (10:51 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 18 Sep 2001 10:51:36 +0000 (10:51 +0000)
* tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
(_AT_CHECK_CALC_ERROR): Likewise.
Factor the `, ' part of verbose error messages.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/calc.at

index adf7058d0bb3f3c7bf947d6180d2720e73f4bd9b..be961874c71f17e5bf0052d8286ff61ab1e3ab26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
+2001-09-18  Akim Demaille  <akim@epita.fr>
+
+       * 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  <autret_m@epita.fr>
 2001-09-18  Marc Autret  <autret_m@epita.fr>
-       
+
        * src/getargs.c (longopts): Declare --defines and --graph as options
        with optional arguments.
        * src/files.h: Add extern declarations.
        * 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  <autret_m@epita.fr>
 
        Turn off %{source,header}_extension feature.
 2001-09-18  Marc Autret  <autret_m@epita.fr>
 
        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.
        * src/files.c (compute_exts_from_gf): Update.
        (compute_exts_from_src): Update.
        (output_files): CPP-out useless code.
index 3d8d0d27003411527f825cfb53a1968bb553f56f..6f0c28c190df0c41e44b8e0e4d174d6f2471d4cf 100644 (file)
@@ -30,7 +30,7 @@ TESTSUITE = $(srcdir)/testsuite
 
 AUTOM4TE = autom4te
 AUTOTEST = $(AUTOM4TE) --language=autotest
 
 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 $@
 
        $(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
 # 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
index bc31ab44ff815f1528198061a80dcbcca4565fa6..93fc80032e5e49422f034e700256c4cf650bb9e7 100644 (file)
@@ -228,7 +228,7 @@ uninstall-am: uninstall-info-am
        maintainer-clean-generic mostlyclean mostlyclean-generic \
        uninstall 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 $@
 
        $(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
 # 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:
 # 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:
index d203e58c1957d8c3ba7a1e2bf3feaf2f66d01a01..c62a528a9f0d368be926c5ab352e1eeea63385b9 100644 (file)
@@ -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.
 # _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_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 <input],
-               [0], [], [])])dnl
+AT_CHECK([calc input])dnl
 ])
 
 
 # _AT_CHECK_CALC_ERROR(BISON-OPTIONS, INPUT,
 #                      [ERROR-LOCATION], [IF-YYERROR-VERBOSE])
 # ------------------------------------------------------------
 ])
 
 
 # _AT_CHECK_CALC_ERROR(BISON-OPTIONS, INPUT,
 #                      [ERROR-LOCATION], [IF-YYERROR-VERBOSE])
 # ------------------------------------------------------------
-# Run `calc' on INPUT, and expect STDERR.
+# Run `calc' on INPUT, and expect a `parse error' message.
+#
+# If BISON-OPTIONS contains `--location', then make sure the ERROR-LOCATION
+# is correctly output on stderr.
+#
+# If BISON-OPTIONS contains `--yyerror-verbose', then make sure the
+# IF-YYERROR-VERBOSE message is properly output after `parse error, '
+# on STDERR.
 m4_define([_AT_CHECK_CALC_ERROR],
 [AT_DATA([[input]],
 [[$2
 ]])
 
 m4_define([_AT_CHECK_CALC_ERROR],
 [AT_DATA([[input]],
 [[$2
 ]])
 
-AT_CHECK([./calc <input 2>&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], [--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],
 # 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],
 _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],
 _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],
 _AT_CHECK_CALC_ERROR([$1], [1 = 2 = 3],
                      [1.6:1.7],
-                     [unexpected `'=''])
+                     [unexpected `'=''])
 _AT_CHECK_CALC_ERROR([$1],
                      [
 +1],
                      [2.0:2.1],
 _AT_CHECK_CALC_ERROR([$1],
                      [
 +1],
                      [2.0:2.1],
-                     [unexpected `'+''])
+                     [unexpected `'+''])
 
 AT_CLEANUP(calc calc.c calc.h calc.output)
 ])# AT_CHECK_CALC
 
 AT_CLEANUP(calc calc.c calc.h calc.output)
 ])# AT_CHECK_CALC