X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/19c50364f38b72dcd7bf67a998db3c815b7b6a94..087c8fdae39621bccfbaba34fe9b2698009174a9:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index 9a8acc56..e038eb28 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -32,14 +32,24 @@ AT_DATA([calc.y], [[/* Infix notation calculator--calc */ %{ +#include #include -#include + +#if STDC_HEADERS +# include +# include +#else +char *strcat(char *dest, const char *src); +#endif #include ]$4[ static int power (int base, int exponent); static void yyerror (const char *s); static int yylex (void); +static int yygetc (void); +static void yyungetc (int c); + extern void perror (const char *s); %} @@ -96,7 +106,7 @@ yyerror (const char *s) } static int -yygetc () +yygetc (void) { int res = getc (yyin); #if YYLSP_NEEDED @@ -235,7 +245,7 @@ AT_DEFINE([AT_DATA_CALC_Y], [_AT_DATA_CALC_Y($[1], $[2], $[3], [ifelse(regexp([$1], [--yyerror-verbose]), [-1], [], - [[#define YYERROR_VERBOSE]])])]) + [[#define YYERROR_VERBOSE 1]])])]) @@ -283,7 +293,7 @@ AT_DATA_CALC_Y([$1]) # Specify the output files to avoid problems on different file systems. AT_CHECK([bison calc.y -o calc.c patsubst([$1], [--yyerror-verbose])], [0], [], []) -AT_CHECK([$CC $CFLAGS calc.c -o calc], 0, [], []) +AT_CHECK([$CC $CFLAGS $CPPFLAGS calc.c -o calc], 0, [], []) # Test the priorities. _AT_CHECK_CALC([$1], @@ -331,8 +341,6 @@ AT_CLEANUP(calc calc.c calc.h calc.output) # ------------------ # AT_CHECK_CALC() -# This one is very suspicious. The test fails, but it might be normal. -AT_CHECK_CALC([--raw]) AT_CHECK_CALC([--defines]) AT_CHECK_CALC([--locations])