+2010-10-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix nits and bugs in tests `help*.test'.
+ * tests/help4.test: Fix broken sed commands used to strip `-W...'
+ flags away from "$AUTOMAKE" and "$ACLOCAL".
+ * tests/help3.test: Likewise, and fix a botched comment.
+ * tests/help.test: Likewise. Also, use "AUTOMAKE_fails ..."
+ instead of "$AUTOMAKE ... && Exit 1", for consistency and to
+ please maintainet-check.
+ * tests/help2.test: Likewise.
+
2010-10-03 Stefano Lattarini <stefano.lattarini@gmail.com>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure --help and --version work, even when no configure.ac
-# is in the current directory.
+# Make sure --help and --version work, even when no configure.ac nor
+# configure.in is in the current directory.
. ./defs || Exit 1
cd emptydir
# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'`
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
$ACLOCAL --version
$ACLOCAL --help
cat stderr >&2
$FGREP configure.ac stderr
$FGREP configure.in stderr
-$AUTOMAKE 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+AUTOMAKE_fails
$FGREP configure.ac stderr
$FGREP configure.in stderr
cd cleandir
# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'`
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
echo '[' > configure.in
$AUTOMAKE --version
$AUTOMAKE --help
-# aclocal and automake cannot work without configure.ac or configure.in
+# Sanity checks: aclocal and automake cannot work with broken configure.in.
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
$FGREP configure.in stderr
-$AUTOMAKE 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+AUTOMAKE_fails
$FGREP configure.in stderr
:
cd cleandir
# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'`
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
cat > configure.in <<END
AC_INIT([$me], [1.0])
$ACLOCAL --output=foo.m4 --force
test -f foo.m4
-mv -f foo.m4 aclocal.m4 # automake will need aclocal.m4
+mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
$AUTOMAKE --add-missing --help --copy
test ! -r install-sh
cd emptydir
# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'`
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
apiversion_rx=`echo "$APIVERSION" | escape_dots`