2010-12-18 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Make test 'posixsubst-script' portable to MinGW/MSYS.
+ * tests/posixsubst-script.test: Ensure that the generated dummy
+ scripts really start with a shebang line, to work around a
+ limitation of 'test -x' on MinGW/MSYS.
+ Reported by Ralf Wildenhues.
+
Improve comments in tests `posixsubst*.test'.
* tests/posixsubst-data.test: Improve comment explaining why we
try also empty match suffix.
AC_OUTPUT
END
+# We have to be careful with 'test -x' commands on MinGW/MSYS, because
+# the file system does not actually have execute permission information.
+# Instead, that is emulated by looking at the file content, and returning
+# 0 if the file starts with, e.g., a COFF header or with '#!'.
+# So we need to create actual scripts in the make rules and in the file
+# creation below.
+
cat > Makefile.am << 'END'
t1 = foo1 foo2
t2 = bar1x bar2
t3 = quu-baz
-bar1 bar2 quux.pl:
- : > $@
+bar1 bar2:
+ (echo '#!/bin/sh' && echo 'exit 0') > $@
+quux.pl:
+ (echo '#!/bin/perl' && echo '1;') > $@
CLEANFILES = bar1 bar2 quux.pl
# Also try an empty match suffix, to ensure that the `:=' in there is
test -x $(prefix)/bin/quux.pl
END
-: > foo1.sh
-: > foo2.sh
+cat > foo1.sh <<'END'
+#!/bin/sh
+exit 0
+END
+cp foo1.sh foo2.sh
$ACLOCAL
$AUTOCONF