Skip to content

Commit

Permalink
tests: fix regressions.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
akimd committed Feb 21, 2012
1 parent 4c4d353 commit 459a57a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion bootstrap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion etc/bench.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/parse-gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
typedef size_t uintptr_t;
#endif

#include <sysexits.h>
// Version mismatch.
#define EX_MISMATCH 63

/*---------.
| Gnulib. |
Expand Down
1 change: 1 addition & 0 deletions tests/calc.at
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/named-refs.at
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 459a57a

Please sign in to comment.