diff options
author | mdejong <mdejong@noemail.net> | 2001-03-29 23:24:31 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2001-03-29 23:24:31 (GMT) |
commit | b93da219081f4774c85cf9937df3a2816728e986 (patch) | |
tree | f660668eb03d537a1160c3ff3746126ec5b636d7 /tests | |
parent | 49807eb975ea05c8a02d1f3cabf8ed949b509937 (diff) | |
download | tcl-b93da219081f4774c85cf9937df3a2816728e986.zip tcl-b93da219081f4774c85cf9937df3a2816728e986.tar.gz tcl-b93da219081f4774c85cf9937df3a2816728e986.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.
FossilOrigin-Name: 05df7048a2896016fd4901c11561d07f3190074b
Diffstat (limited to 'tests')
-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 |