2010-09-25 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Testsuite: Use `$PATH_SEPARATOR', not `:', when extending PATH.
+ * tests/compile2.test: Do no uselessly (implicitly) repeat the
+ computation of PATH_SEPARATOR again.
+ * tests/instmany-mans.test: Use `$PATH_SEPARATOR', not `:', when
+ extending/redefining PATH.
+ * tests/instmany-python.test: Likewise.
+ * tests/instmany.test: Likewise.
+ * tests/man4.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/mmodely.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo30.test: Likewise.
+ * tests/README (Section "Writing test cases" subsection "Do"):
+ Updated.
+ * Makefile.am (sc_tests_PATH_SEPARATOR): New maintainer check.
+ (syntax_check_rules): Updated.
+
Testsuite: new variables `$PATH_SEPARATOR' and `$APIVERSION'.
* tests/defs.in ($APIVERSION): New AC_SUBST'd variable.
($ACLOCAL, $AUTOMAKE): Use it.
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
exit 1; \
fi
+## Using `:' as a PATH separator is not portable.
+sc_tests_PATH_SEPARATOR:
+ @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+ echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
exit 1; \
fi
+sc_tests_PATH_SEPARATOR:
+ @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+ echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
Use `Exit' rather than `exit' to abort a test.
+ Use `$PATH_SEPARATOR', not hard-coded `:', as the separator of
+ PATH's entries.
+
It's more important to make sure that a feature works, than
make sure that Automake's output looks correct. It might look
correct and still fail to work. In other words, prefer
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Absolute w32 paths should be accepted.
# Do not actually run this test on anything that could be w32.
test -d "C:\\" && Exit 77
-# This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
-(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- Exit 77
-}
+case $PATH_SEPARATOR in ';'|':');; *) Exit 77;; esac
amtest_source='C:\libltdl\libltdl\slist.c'
amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
$MAKE install-man3 && Exit 1
chmod u+r $srcdir/$file
done
+
:
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod +x foo bar help2man
save_PATH=$PATH
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
$ACLOCAL
$AUTOMAKE
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod +x bin/mkdir
AM_PATH=$PATH
export AM_PATH
-PATH=`pwd`/bin:$PATH
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
export PATH
# Test mkinstalldirs without mkdir -p.
#! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007, 2009, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo "$@" >lex.yy.c
END
chmod +x myyacc.sh mylex.sh
-PATH="`pwd`:$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
# make maintainer-clean; ./configure; make should always work,
# per GNU Standard.
END
chmod +x mycc
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
cat >Makefile.am <<'EOF'
SUBDIRS = @subdirs@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod +x makeinfo
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
export PATH
$ACLOCAL