The attached patch is a cleanup that ideally should have been squashed
into the commit v1.11-362-g7c0d9cb "tests: split yacc6.test, for better
separation and coverage"; but I had already pushed it when I came up
with thee changes.

Sorry for the noise,
  Stefano

-*-*-

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.

From d6186ffa1f4b9889f2b30fd52fca1b26d2cbf3af Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Fri, 15 Apr 2011 14:34:35 +0200
Subject: [PATCH 1/2] 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.
---
 ChangeLog              |    9 +++++++++
 tests/yacc-auxdir.test |    1 -
 tests/yacc-line.test   |    4 ++++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb0b4c3..7343070 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-04-14  Stefano Lattarini  <stefano.lattar...@gmail.com>
+
+	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  <stefano.lattar...@gmail.com>
 
 	tests: split yacc6.test, for better separation and coverage
diff --git a/tests/yacc-auxdir.test b/tests/yacc-auxdir.test
index 973a338..700fcd8 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 ae6dbcf..8972a3d 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
-- 
1.7.2.3

Reply via email to