From: Stefano Lattarini Date: Fri, 15 Apr 2011 12:34:35 +0000 (+0200) Subject: tests: minor improvements to a couple of yacc tests X-Git-Tag: ylwrap-refactor-abandoned-branch~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6186ffa1f4b9889f2b30fd52fca1b26d2cbf3af;p=thirdparty%2Fautomake.git tests: minor improvements to a couple of yacc tests * tests/yacc-auxdir.test: Avoid running autoconf, it's not needed. * tests/yacc-line.test: Also check that the yacc-generated C and header files do not contain "#line" directives referencing `y.tab.c' or `y.tab.h'. Add a couple of explicative comments. --- diff --git a/ChangeLog b/ChangeLog index eb0b4c3be..73430706a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-04-14 Stefano Lattarini + + tests: minor improvements to a couple of yacc tests + * tests/yacc-auxdir.test: Avoid running autoconf, it's not + needed. + * tests/yacc-line.test: Also check that the yacc-generated C + and header files do not contain "#line" directives referencing + `y.tab.c' or `y.tab.h'. Add a couple of explicative comments. + 2011-04-11 Stefano Lattarini tests: split yacc6.test, for better separation and coverage diff --git a/tests/yacc-auxdir.test b/tests/yacc-auxdir.test index 973a33807..700fcd8cf 100755 --- a/tests/yacc-auxdir.test +++ b/tests/yacc-auxdir.test @@ -48,7 +48,6 @@ bar_SOURCES = bar.y main.c END $ACLOCAL -$AUTOCONF $AUTOMAKE -a test -f aux1/ylwrap test ! -f ylwrap diff --git a/tests/yacc-line.test b/tests/yacc-line.test index ae6dbcfa5..8972a3d8a 100755 --- a/tests/yacc-line.test +++ b/tests/yacc-line.test @@ -98,7 +98,11 @@ for vpath in : false; do ls -l . sub sub/dir $FGREP '.y' $c_outputs + # Adjusted "#line" should not contain reference to the builddir. $EGREP '#.*line.*(build|\.\.).*\.y' $c_outputs && Exit 1 + # Adjusted "#line" should not contain reference to the default + # output file names, e.g., `y.tab.c' and `y.tab.h'. + $EGREP '#.*line.*y\.tab\.' $c_outputs && Exit 1 # Don't be excessively strict in grepping, to avoid spurious failures. grep '#.*line.*zardoz\.y' zardoz.c grep '#.*line.*quux\.y' bar-quux.c