X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/595284e9d0277517bac8f3fc7bcdd529d97aa6f9..f6b561d9f9cbc6fc95bbb86518372a5cb52f45a6:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index f785d6f0..b959bfaf 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -503,14 +503,17 @@ AT_CHECK([cat stderr], 0, [expout]) # 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. -AT_CHECK([sed -ne '/[ ]$/{=;p;}' $1]) -# No tabulations. -AT_CHECK([sed -ne '/[ ]/{=;p;}' $1]) -# No final empty lines. -AT_CHECK([sed -ne '${/^$/{=;p;};}' $1]) +[AT_CHECK([$PERL -ne ' + chomp; + print "$.: {$_}\n" + if (# No starting/ending empty lines. + (eof || $. == 1) && /^\s*$/ + # No trailing space. + || /\s$/ + # No tabs. + || /\t/ + )' $1 +])dnl ]) @@ -713,7 +716,7 @@ m4_define([AT_CHECK_CALC_LALR1_CC], AT_CHECK_CALC_LALR1_CC([]) AT_CHECK_CALC_LALR1_CC([%locations]) -AT_CHECK_CALC_LALR1_CC([%locations %define location_type Span]) +AT_CHECK_CALC_LALR1_CC([%locations %define api.location.type Span]) AT_CHECK_CALC_LALR1_CC([%defines %locations %define parse.error verbose %name-prefix "calc" %verbose %yacc]) AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %define api.prefix "calc" %verbose %yacc]) @@ -747,7 +750,7 @@ m4_define([AT_CHECK_CALC_GLR_CC], AT_CHECK_CALC_GLR_CC([]) AT_CHECK_CALC_GLR_CC([%locations]) -AT_CHECK_CALC_GLR_CC([%locations %define location_type Span]) +AT_CHECK_CALC_GLR_CC([%locations %define api.location.type Span]) AT_CHECK_CALC_GLR_CC([%defines %define parse.error verbose %name-prefix "calc" %verbose %yacc]) AT_CHECK_CALC_GLR_CC([%define parse.error verbose %define api.prefix "calc" %verbose %yacc])