+2004-09-26 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * tests/compile.test, tests/instsh2.test, tests/instspc.test: Use
+ two consecutive spaces in filename instead of one, to catch mistake
+ like `echo $val | ...`.
+ * tests/README: Suggest this.
+ Suggested by Ralf Wildenhues.
+
2004-09-25 Alexandre Duret-Lutz <adl@gnu.org>
* doc/automake.texi (Clean): Document -local targets.
before the following runs. On fast machines the new `configure.in'
could otherwise have the same timestamp as the old `autom4te.cache'.
+ Use filenames with two consecutive spaces when testing that some
+ code preserves filenames with spaces. This will catch errors like
+ `echo $filename | ...`.
+
Before commit: make sure the test is executable, add the tests to
TESTS in Makefile.am, add it to XFAIL_TESTS in addition if needed,
write a ChangeLog entry, send the diff to <automake-patches@gnu.org>.
cp $testsrcdir/../lib/compile .
-# -o 'a c' should not be stripped because 'a c' is not an object
+# -o 'a c' should not be stripped because 'a c' is not an object
# (it does not matter whether touch creates ./-- or not)
-./compile touch a.o -- -o 'a c' a.c
-test -f 'a c'
+./compile touch a.o -- -o 'a c' a.c
+test -f 'a c'
test -f ./-o
test -f a.o
test -f a.c
-rm -f 'a c' ./-o a.o a.c
+rm -f 'a c' ./-o a.o a.c
-./compile touch a.o -- -o 'a c.o' a.c
-test -f 'a c.o'
+./compile touch a.o -- -o 'a c.o' a.c
+test -f 'a c.o'
test ! -f ./-o
test ! -f a.o
test -f a.c
set -e
# Make sure this system supports spaces in filenames.
-mkdir 'a b' || exit 77
+mkdir 'a b' || exit 77
cat >> configure.in <<'EOF'
AC_PROG_CC
sub_libnobase_a_SOURCES = source.c
test-install-space: install
- test -f "$(DESTDIR)/more space/foo/sub/nobase.h"
- test ! -f "$(DESTDIR)/more space/foo/nobase.h"
- test -f "$(DESTDIR)/more space/foo/base.h"
- test -f "$(DESTDIR)/more space/foo/sub/nobase.dat"
- test ! -f "$(DESTDIR)/more space/foo/nobase.dat"
- test -f "$(DESTDIR)/more space/foo/base.dat"
- test -f "$(DESTDIR)/more space/foo/sub/nobase.sh"
- test ! -f "$(DESTDIR)/more space/foo/nobase.sh"
- test -f "$(DESTDIR)/more space/foo/base.sh"
- test -f "$(DESTDIR)/more space/foo/sub/nobase$(EXEEXT)"
- test ! -f "$(DESTDIR)/more space/foo/nobase$(EXEEXT)"
- test -f "$(DESTDIR)/more space/foo/base$(EXEEXT)"
- test -f "$(DESTDIR)/more space/foo/sub/libnobase.a"
- test ! -f "$(DESTDIR)/more space/foo/libnobase.a"
- test -f "$(DESTDIR)/more space/foo/libbase.a"
+ test -f "$(DESTDIR)/more space/foo/sub/nobase.h"
+ test ! -f "$(DESTDIR)/more space/foo/nobase.h"
+ test -f "$(DESTDIR)/more space/foo/base.h"
+ test -f "$(DESTDIR)/more space/foo/sub/nobase.dat"
+ test ! -f "$(DESTDIR)/more space/foo/nobase.dat"
+ test -f "$(DESTDIR)/more space/foo/base.dat"
+ test -f "$(DESTDIR)/more space/foo/sub/nobase.sh"
+ test ! -f "$(DESTDIR)/more space/foo/nobase.sh"
+ test -f "$(DESTDIR)/more space/foo/base.sh"
+ test -f "$(DESTDIR)/more space/foo/sub/nobase$(EXEEXT)"
+ test ! -f "$(DESTDIR)/more space/foo/nobase$(EXEEXT)"
+ test -f "$(DESTDIR)/more space/foo/base$(EXEEXT)"
+ test -f "$(DESTDIR)/more space/foo/sub/libnobase.a"
+ test ! -f "$(DESTDIR)/more space/foo/libnobase.a"
+ test -f "$(DESTDIR)/more space/foo/libbase.a"
EOF
mkdir sub
mkdir build
cd build
-../configure --prefix '/more space'
+../configure --prefix '/more space'
$MAKE
-dest=`pwd`/'with space';
-DESTDIR="$dest" $MAKE -e test-install-space
+dest=`pwd`/'with space';
+DESTDIR=$dest $MAKE -e test-install-space