aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2021-04-09 08:08:02 +1000
committerSteve Bennett <steveb@workware.net.au>2021-04-09 08:29:24 +1000
commitbcd4434161897da5203cdfaef8b2227e15d82c45 (patch)
treefdadc54b907c5ca5e71aa2168fb0d0894824a114 /tests
parent4a5392ef726b2ab4f750df5cae471699bc809b05 (diff)
downloadjimtcl-bcd4434161897da5203cdfaef8b2227e15d82c45.zip
jimtcl-bcd4434161897da5203cdfaef8b2227e15d82c45.tar.gz
jimtcl-bcd4434161897da5203cdfaef8b2227e15d82c45.tar.bz2
build: Allow some paths to contain spaces
Quote the build dir or and the path to jimsh/tclsh in the Makefile in case they contain spaces. Also fix a few problems in tests/ that arise when the build and/or source dir contain spaces. Fixes #199 Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in6
-rw-r--r--tests/interactive.test2
-rw-r--r--tests/runall.tcl2
3 files changed, 4 insertions, 6 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e89f2fb..0d7c63c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,13 +1,11 @@
jimsh ?= ../jimsh
tclsh ?= tclsh
-DEF_LD_PATH := @LD_LIBRARY_PATH@="@builddir@:$(@LD_LIBRARY_PATH@)"
-
test:
- @$(DEF_LD_PATH) $(jimsh) @abs_top_srcdir@/tests/runall.tcl
+ @LD_LIBRARY_PATH="@builddir@:$(@LD_LIBRARY_PATH@)" "$(jimsh)" "@abs_top_srcdir@/tests/runall.tcl"
tcl:
- @rc=0; for i in @abs_top_srcdir@/tests/*.test; do $(tclsh) -encoding utf-8 $$i || rc=$?; done; exit $$rc
+ @rc=0; for i in "@abs_top_srcdir@"/tests/*.test; do "$(tclsh)" -encoding utf-8 $$i || rc=$?; done; exit $$rc
clean:
rm -f gorp.file2 gorp.file sleepx test1 exec.tmp1
diff --git a/tests/interactive.test b/tests/interactive.test
index d1c29c1..2e783f9 100644
--- a/tests/interactive.test
+++ b/tests/interactive.test
@@ -12,7 +12,7 @@ set env(HOME) [pwd]
file delete .jim_history
# spawn the process to be used for testing
-set p [expect::spawn [info nameofexecutable]]
+set p [expect::spawn [list [info nameofexecutable]]]
set env $saveenv
diff --git a/tests/runall.tcl b/tests/runall.tcl
index a97ecfd..9ef76b8 100644
--- a/tests/runall.tcl
+++ b/tests/runall.tcl
@@ -42,7 +42,7 @@ if {[info commands interp] eq ""} {
}
# Run the test
- catch -exit {$i eval source $script} msg opts
+ catch -exit [list $i eval [list source $script]] msg opts
if {[info returncode $opts(-code)] eq "error"} {
puts [format "%16s: --- error ($msg)" $script]
incr total(fail)