diff --git a/Makefile.in b/Makefile.in index b18768ea..e5dbe86e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -132,7 +132,7 @@ uninstall: @endif test check: $(JIMSH) - $(DEF_LD_PATH) $(MAKE) -C tests jimsh=@builddir@/jimsh + $(DEF_LD_PATH) $(MAKE) -C tests jimsh="@builddir@/jimsh" $(OBJS) jimsh.o initjimsh.o: Makefile $(wildcard *.h) diff --git a/auto.def b/auto.def index 3f2f5a0c..347951ff 100644 --- a/auto.def +++ b/auto.def @@ -296,7 +296,7 @@ switch -glob -- $host_os { # Find some tools cc-check-tools ar ranlib strip -define tclsh [info nameofexecutable] +define tclsh [quote-if-needed [info nameofexecutable]] # We only support silent-rules for GNU Make define NO_SILENT_RULES diff --git a/tests/Makefile.in b/tests/Makefile.in index e89f2fb0..0d7c63c8 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 d1c29c1b..2e783f9d 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 a97ecfd0..9ef76b82 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)