* tests/compile.test, tests/instsh2.test, tests/instspc.test: Use
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 26 Sep 2004 20:33:50 +0000 (20:33 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 26 Sep 2004 20:33:50 +0000 (20:33 +0000)
two consecutive spaces in filename instead of one, to catch mistake
like `echo $val | ...`.
* tests/README: Suggest this.
Suggested by Ralf Wildenhues.

ChangeLog
tests/README
tests/compile.test
tests/instsh2.test
tests/instspc.test

index 6d29a1c..916b35a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index 5aa328b..4b63059 100644 (file)
@@ -100,6 +100,10 @@ Do
   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>.
index ee435f3..a0ca397 100755 (executable)
@@ -26,18 +26,18 @@ set -e
 
 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
index 894431a..99c661c 100755 (executable)
@@ -72,8 +72,8 @@ test -f d3/y
 ./install-sh -T x d3 && exit 1
 
 # Ensure that install-sh works with names that include spaces
-touch 'a b'
-mkdir 'x y'
-./install-sh 'a b' 'x y'
-test -f x\ y/a\ b
-test -f 'a b'
+touch 'a  b'
+mkdir 'x  y'
+./install-sh 'a  b' 'x  y'
+test -f x\ \ y/a\ \ b
+test -f 'a  b'
index 04e3d07..a0e315b 100755 (executable)
@@ -33,7 +33,7 @@ required='gcc'
 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
@@ -65,21 +65,21 @@ sub_libbase_a_SOURCES = source.c
 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
@@ -107,7 +107,7 @@ $AUTOMAKE -a
 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