* 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+\"[EMAIL PROTECTED]"}"])
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], [EMAIL PROTECTED])
+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