[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/10] Fix Autotest for whitespace in `pwd`.
From: |
Ralf Wildenhues |
Subject: |
[PATCH 3/10] Fix Autotest for whitespace in `pwd`. |
Date: |
Tue, 4 Dec 2007 22:46:18 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* lib/autotest/general.m4 (AT_INIT)
<at_func_create_debugging_script, Driver Loop>:
Quote $at_group_dir.
* tests/autotest.at (whitespace in absolute testdir): New test.
---
lib/autotest/general.m4 | 8 ++++----
tests/autotest.at | 31 +++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 022c56d..cf33cda 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -334,8 +334,8 @@ at_func_create_debugging_script ()
AS_ECHO(["exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d ]dnl
[$at_debug_args $at_group \${1+\"address@hidden"}"])
echo 'exit 1'
- } >$at_group_dir/run
- chmod +x $at_group_dir/run
+ } >"$at_group_dir/run"
+ chmod +x "$at_group_dir/run"
}
# at_func_arith
@@ -911,8 +911,8 @@ do
AS_WARN([test directory could not be cleaned.])
fi
# Be tolerant if the above `rm' was not able to remove the directory.
- AS_MKDIR_P([$at_group_dir])
- cd $at_group_dir
+ AS_MKDIR_P(["$at_group_dir"])
+ cd "$at_group_dir"
echo 0 > "$at_status_file"
diff --git a/tests/autotest.at b/tests/autotest.at
index fa7b7ea..0f3fdf0 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -618,3 +618,34 @@ AT_CHECK([./suite], [0], [ignore])
cd ../..
AT_CLEANUP
+
+
+## ------------------------------ ##
+## whitespace in absolute testdir ##
+## ------------------------------ ##
+
+AT_SETUP([whitespace in absolute testdir])
+AT_KEYWORDS([autotest])
+
+dir='dir with whitespace'
+mkdir "$dir"
+cd "$dir"
+wd=`pwd`
+
+AT_DATA([a])
+AT_DATA([suite.at],
+[[m4_define([AT_PACKAGE_NAME], [GNU Nonsense])
+m4_define([AT_PACKAGE_TARNAME], [nonsense])
+m4_define([AT_PACKAGE_VERSION], [1.0])
+m4_define([AT_PACKAGE_STRING], [GNU Nonsense 1.0])
+m4_define([AT_PACKAGE_BUGREPORT], address@hidden)
+AT_INIT([suite to check srcdir])
+AT_SETUP([my only test])
+AT_CHECK([test -f "$top_srcdir"/a])
+AT_CLEANUP
+]])
+AT_CHECK_AUTOM4TE([--language=autotest -o suite suite.at])
+AT_CHECK([top_srcdir=$wd ./suite], [0], [ignore])
+AT_CHECK([top_srcdir=$wd ./suite -d], [0], [ignore])
+AT_CHECK([cd suite.dir/1 && ./run top_srcdir="$wd"], [0], [ignore])
+AT_CLEANUP
--
1.5.3.6.950.g92b7b
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., (continued)
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Russ Allbery, 2007/12/04
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Paul Eggert, 2007/12/04
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Eric Blake, 2007/12/05
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Ralf Wildenhues, 2007/12/06
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Eric Blake, 2007/12/12
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Ralf Wildenhues, 2007/12/13
[PATCH 2/10] * lib/autom4te.in: Quote @address@hidden, Ralf Wildenhues, 2007/12/04
[PATCH 3/10] Fix Autotest for whitespace in `pwd`.,
Ralf Wildenhues <=
[PATCH 4/10] Proper config.status --file/--header and $srcdir escaping., Ralf Wildenhues, 2007/12/04
[PATCH 5/10] Fix testsuite program wrapper for whitespace in `pwd`., Ralf Wildenhues, 2007/12/04
[PATCH 6/10] * tests/m4sh.at (LINENO): Quote $0., Ralf Wildenhues, 2007/12/04
[PATCH 7/10] Quote $abs_top_srcdir in tests., Ralf Wildenhues, 2007/12/04
[PATCH 8/10] * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test if `pwd` contains whitespace., Ralf Wildenhues, 2007/12/04
[PATCH 9/10] Do not pass top_srcdir to configure scripts in testsuite., Ralf Wildenhues, 2007/12/04
[PATCH 10/10] * tests/torture.at (srcdir): Fix quoting., Ralf Wildenhues, 2007/12/04