From 459a57a90ff6fc8209498b7d5bc6e33d5e633f23 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 21 Feb 2012 15:38:09 +0100 Subject: [PATCH] tests: fix regressions. 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 | 1 - etc/bench.pl.in | 2 +- src/parse-gram.y | 2 +- src/system.h | 3 ++- tests/calc.at | 1 + tests/named-refs.at | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index cb3fc870..9e74861d 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -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 diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 0bee4df1..5d83fc7b 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -371,8 +371,8 @@ sub generate_grammar_calc ($$@) or die; print $out < #include - #include #include #include diff --git a/src/parse-gram.y b/src/parse-gram.y index 9e5bbe61..532349bb 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -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); } } diff --git a/src/system.h b/src/system.h index a3168db1..24151bba 100644 --- a/src/system.h +++ b/src/system.h @@ -52,7 +52,8 @@ typedef size_t uintptr_t; #endif -#include +// Version mismatch. +#define EX_MISMATCH 63 /*---------. | Gnulib. | diff --git a/tests/calc.at b/tests/calc.at index 2f357137..28e6c50e 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -207,6 +207,7 @@ extern FILE *input;]AT_SKEL_CC_IF([[ %code { +#include #include #include #if HAVE_UNISTD_H diff --git a/tests/named-refs.at b/tests/named-refs.at index 2490d2df..0b2f4c94 100644 --- a/tests/named-refs.at +++ b/tests/named-refs.at @@ -23,6 +23,7 @@ AT_SETUP([Tutorial calculator]) AT_DATA_GRAMMAR([test.y], [[ %{ +#include #include #include #include -- 2.47.2