summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--tests/interp.test25
2 files changed, 30 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cf3bd1f..efa15be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-29 Mo DeJong <mdejong@redhat.com>
+
+ * tests/interp.test: Print out warning when
+ testinterpdelete command is not defined.
+ Add tests that checks to make sure a
+ child interp inherits the parent's cwd.
+
2001-03-29 Jeff Hobbs <jeffh@gimlet.activestate.com>
* unix/tclUnixPipe.c (TclpCreateTempFile): prevent potential race
diff --git a/tests/interp.test b/tests/interp.test
index 6cad192..0dab342 100644
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: interp.test,v 1.11 2000/04/10 17:19:00 ericm Exp $
+# RCS: @(#) $Id: interp.test,v 1.12 2001/03/29 23:24:32 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -635,7 +635,10 @@ test interp-17.5 {alias loop prevention} {
# the bugs as a core dump.
#
-if {[info commands testinterpdelete] != ""} {
+if {[info commands testinterpdelete] == ""} {
+ puts "This application hasn't been compiled with the \"testinterpdelete\""
+ puts "command, so I can't test slave delete calls"
+} else {
test interp-18.1 {testing Tcl_DeleteInterp vs slaves} {
list [catch {testinterpdelete} msg] $msg
} {1 {wrong # args: should be "testinterpdelete path"}}
@@ -2353,6 +2356,24 @@ test interp-31.1 {alias invocation scope} {
set result
} ok
+test interp-32.1 { parent's working directory should
+ be inherited by a child interp } {
+ set parent [pwd]
+ set i [interp create]
+ set child [$i eval pwd]
+ interp delete $i
+ file mkdir cwd_test
+ cd cwd_test
+ lappend parent [pwd]
+ set i [interp create]
+ lappend child [$i eval pwd]
+ cd ..
+ file delete cwd_test
+ interp delete $i
+ expr {[string equal $parent $child] ? 1 :
+ "\{$parent\} != \{$child\}"}
+} 1
+
# cleanup
foreach i [interp slaves] {
interp delete $i