From: Akim Demaille Date: Tue, 21 Feb 2012 14:38:09 +0000 (+0100) Subject: tests: fix regressions. X-Git-Tag: v2.5.1_rc2~90 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/da209f943b44fd407436db79ac8e6a56f569ab9c?hp=-c 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. (cherry picked from commit 459a57a90ff6fc8209498b7d5bc6e33d5e633f23) --- da209f943b44fd407436db79ac8e6a56f569ab9c diff --git a/bootstrap.conf b/bootstrap.conf index f2aca47d..e9b8ba6c 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 ff3ce230..4d480d5e 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -134,8 +134,8 @@ sub calc_grammar ($$$) or die; print $out < #include - #include #include #include diff --git a/src/parse-gram.y b/src/parse-gram.y index da0aef71..33b802ed 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -759,7 +759,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 1c02f253..9191b556 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 f0e30ad3..455cd72f 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 35c2382b..d2942cfc 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