tests: work around a ksh bug w.r.t. ${1+"$@"}
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 4 Aug 2012 14:54:30 +0000 (16:54 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 4 Aug 2012 15:45:02 +0000 (17:45 +0200)
commit65dadf65814d7dd395d5cc35903f624b464091c6
tree6c66dd0acd2079ea1e93e5a3a951606325f49c30
parent6d6c831d9cec0549434f0f0c15437b810b877d10
tests: work around a ksh bug w.r.t. ${1+"$@"}

Fixes automake bug#10898.  See also the older (much older) thread:
<http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00036.html>

At least the AT&T and OpenSolaris versions of the Korn shell, as well
as the /bin/sh from OpenIndiana 11, have a strange bug regarding the
expansion of ${1+"$@"}: when exactly *one empty* argument is passed to
a script run by one of this shells, inside that script ${1+"$@"} will
expand to *nothing*, rather than to to the single empty string, as
one would expect (OTOH, $# will correctly expand to 1).  This buggy
behaviour was causing a spurious failure in our testsuite (test 6 in
't/automake-cmdline.tap').  Work around it.

* t/wrap/automake.in: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/wrap/automake.in