tests: avoid ksh bug for wildcards in EXTRA_DIST
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 Feb 2012 18:26:29 +0000 (19:26 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 Feb 2012 18:26:41 +0000 (19:26 +0100)
commit02ce5d5a0ce42563e8aa8ea03a977d35f3a30f72
tree33c236b81649302daa5bca33531a59b251cbb45c
parentff8269e114bcee4070b8837c1e8715dd5c22d04f
tests: avoid ksh bug for wildcards in EXTRA_DIST

Some shells, like NetBSD 5.1 /bin/ksh, have a bug that causes
wildcards resulting from an unquoted parameter expansion not to
be expanded as expected in some cases:

    $ touch a b c d
    $ /bin/sh -c 'var="[ab]" && echo $var' # As expected.
    a b
    $ /bin/ksh -c 'var="[ab]" && echo $var' # Oops.
    [ab]
    $ /bin/ksh -c 'var="?" && echo $var' # But this as expected.
    a b c d

This was causing a failure in our testsuite.  Work around that.

See also:
<http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00149.html>

* tests/extra11.test: Work around the described issue by using the
$(wildcard) builtin in the EXTRA_DIST definition.  This is not a
problem, since this test was assuming GNU make anyway.  Since we are
at it, enhance coverage a little by also running "make distcheck".
* tests/extra10.test: Similarly, enhance coverage by also running
"make distcheck", and fix a minor bug in the process.  But continue
using a "bare" wildcard expression in EXTRA_DIST, without involving
the $(wildcard) builtin, to ensure coverage of similar usages "in
the wild".
tests/extra10.test
tests/extra11.test