X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/62a58c14bdd489d86621227ec2ed6038da7772cd..dcd5344dcde3ddc4761867134e6f8cc7b945ce1c:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index 31ee44e2..3aab8681 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -386,11 +386,9 @@ AT_YYERROR_SEES_LOC_IF([ fprintf (stderr, ": ");]) fprintf (stderr, "%s\n", s); }])[ - ]AT_DEFINES_IF([], [AT_CALC_LEX -AT_CALC_MAIN])[ -]]) +AT_CALC_MAIN])]) AT_DEFINES_IF([AT_DATA_SOURCE([[calc-lex.c]AT_SKEL_CC_IF([[c]])], [[#include "calc.h]AT_SKEL_CC_IF([[h]])[" @@ -500,6 +498,20 @@ AT_CHECK([cat stderr], 0, [expout]) ]) +# AT_CHECK_SPACES([FILE]) +# ----------------------- +# Make sure we did not introduce bad spaces. Checked here because all +# the skeletons are (or should be) exercized here. +m4_define([AT_CHECK_SPACES], +[# No initial empty lines. +AT_CHECK([sed -ne '/./q;=;p;' $1]) +# No trailing spaces. +# FIXME: For 2.7: AT_CHECK([sed -ne '/[ ]$/{=;p;}' $1]) +# No final empty lines. +AT_CHECK([sed -ne '${/^$/{=;p;};}' $1]) +]) + + # AT_CHECK_CALC([BISON-OPTIONS]) # ------------------------------ # Start a testing chunk which compiles `calc' grammar with @@ -514,6 +526,8 @@ AT_BISON_OPTION_PUSHDEFS([$1]) AT_DATA_CALC_Y([$1]) AT_FULL_COMPILE([calc], AT_DEFINES_IF([[lex], [main]])) +AT_CHECK_SPACES([calc.AT_SKEL_CC_IF([cc], [c])]) +AT_DEFINES_IF([AT_CHECK_SPACES([calc.AT_SKEL_CC_IF([hh], [h])])]) # Test the priorities. _AT_CHECK_CALC([$1],