diff options
author | mdejong <mdejong> | 2001-03-29 23:24:32 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2001-03-29 23:24:32 (GMT) |
commit | c9f5090400b6c978940356c03f1debdade340b40 (patch) | |
tree | f660668eb03d537a1160c3ff3746126ec5b636d7 /tests/interp.test | |
parent | 2c1380976a137f6dea42069da86488ca3f34345c (diff) | |
download | tcl-c9f5090400b6c978940356c03f1debdade340b40.zip tcl-c9f5090400b6c978940356c03f1debdade340b40.tar.gz tcl-c9f5090400b6c978940356c03f1debdade340b40.tar.bz2 |
* 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.
Diffstat (limited to 'tests/interp.test')
-rw-r--r-- | tests/interp.test | 25 |
1 files changed, 23 insertions, 2 deletions
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 |