2011-04-23 Stefano Lattarini <stefano.lattarini@gmail.com>
+ java tests: tweak and make stricter a couple of tests
+ * tests/javasubst.test: Use proper m4 quoting. Add trailing `:'
+ command. Enable `errexit' shell flag, and related changes.
+ Prefer cat + here-doc over echo to append to configure.in.
+ Make grepping of Makefile.in stricter. Add debugging output.
+ Improve heading comments.
+ * tests/javaprim.test: Likewise.
+
+2011-04-23 Stefano Lattarini <stefano.lattarini@gmail.com>
+
java coverage: add test on uninstall with JAVA primary
* tests/java-uninstall.test: New test.
* tests/Makefile.am (TESTS): Update.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure JAVA variable can be defined.
+# Test to make sure JAVA variable can be defined by AC_SUBST.
. ./defs || Exit 1
-echo 'AC_SUBST(JAVA)' >> configure.in
+cat >> configure.in << 'END'
+AC_SUBST([JAVA])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+grep -i java Makefile.in # For debugging.
+grep '^JAVA = *@JAVA@ *$' Makefile.in
+
+:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure redefining JAVAC works.
+# Test to make sure redefining JAVAC with AC_SUBST works.
. ./defs || Exit 1
-echo 'AC_SUBST(JAVAC)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVAC])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep -i java Makefile.in # For debugging.
+grep '^JAVAC = *@JAVAC@ *$' Makefile.in
-grep 'JAVAC.*@JAVAC@' Makefile.in
+: