]> git.saurik.com Git - bison.git/commitdiff
tests: fix regressions.
authorAkim Demaille <demaille@gostai.com>
Tue, 21 Feb 2012 14:38:09 +0000 (15:38 +0100)
committerAkim Demaille <demaille@gostai.com>
Tue, 21 Feb 2012 14:42:13 +0000 (15:42 +0100)
Exit status 63 is documented for version-mismatch.
* bootstrap.conf (gnulib_modules): Remove sysexits.
* src/system.h (EX_MISMATCH): Define.
* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.

Missing includes.
* tests/calc.at, tests/named-refs.at: Include assert.h.

bootstrap.conf
etc/bench.pl.in
src/parse-gram.y
src/system.h
tests/calc.at
tests/named-refs.at

index cb3fc870e42b11483a445409c6f6ebee98d6ea3a..9e74861d59c6f470a99e315bff11b45a2979b172 100644 (file)
@@ -25,7 +25,6 @@ gnulib_modules='
   mbswidth obstack perror pipe-posix progname
   quote quotearg realloc-posix
   spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
-  sysexits
   unistd unistd-safer unlocked-io update-copyright unsetenv verify
   warnings xalloc xalloc-die xstrndup
 
index 0bee4df1bd97537828d7ae33f6d6320ed3047aa3..5d83fc7be480b952fa6bf9b3e5988b3c0e928496 100755 (executable)
@@ -371,8 +371,8 @@ sub generate_grammar_calc ($$@)
     or die;
   print $out <<EOF;
 %{
+#include <assert.h>
 #include <stdio.h>
-
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
index 9e5bbe61c3e737c6b79b03cd34c64da5c2dd9f2b..532349bbe40230c346b85986efd8acffe4abe397 100644 (file)
@@ -804,7 +804,7 @@ version_check (location const *loc, char const *version)
     {
       complain_at (*loc, "require bison %s, but have %s",
                    version, PACKAGE_VERSION);
-      exit (EX_CONFIG);
+      exit (EX_MISMATCH);
     }
 }
 
index a3168db106dd33cfe19cea9d307672fee7305884..24151bbadab4c5565831244b7a3fd083a0f2477d 100644 (file)
@@ -52,7 +52,8 @@
 typedef size_t uintptr_t;
 #endif
 
-#include <sysexits.h>
+// Version mismatch.
+#define EX_MISMATCH 63
 
 /*---------.
 | Gnulib.  |
index 2f35713710ea1e74e91b90c6c2b7cbb9afa481cd..28e6c50e8a08d02b54d1cdae54f7e57a13d02476 100644 (file)
@@ -207,6 +207,7 @@ extern FILE *input;]AT_SKEL_CC_IF([[
 
 %code
 {
+#include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #if HAVE_UNISTD_H
index 2490d2df8c7b1f9c968ac62f60f8212f545fa17b..0b2f4c94ef1641ebf9e6e5b86b284eed402b96ec 100644 (file)
@@ -23,6 +23,7 @@ AT_SETUP([Tutorial calculator])
 AT_DATA_GRAMMAR([test.y],
 [[
 %{
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>