diff options
Diffstat (limited to 'tests/interp.test')
-rw-r--r-- | tests/interp.test | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/interp.test b/tests/interp.test index 6c22b5e..6a5ba41 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.63 2009/01/30 16:01:34 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.64 2009/02/02 06:02:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -18,7 +18,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testinterpdelete [llength [info commands testinterpdelete]] -testConstraint interpNotEnsemble [expr ![namespace ensemble exists ::interp]] set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket source unload} @@ -27,10 +26,10 @@ foreach i [interp slaves] { } # Part 0: Check out options for interp command -test interp-1.1 {options for interp command} interpNotEnsemble { +test interp-1.1 {options for interp command} { list [catch {interp} msg] $msg } {1 {wrong # args: should be "interp cmd ?arg ...?"}} -test interp-1.2 {options for interp command} interpNotEnsemble { +test interp-1.2 {options for interp command} { list [catch {interp frobox} msg] $msg } {1 {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.3 {options for interp command} { @@ -48,13 +47,13 @@ test interp-1.5 {options for interp command} { test interp-1.6 {options for interp command} { list [catch {interp slaves foo bar zop} msg] $msg } {1 {wrong # args: should be "interp slaves ?path?"}} -test interp-1.7 {options for interp command} interpNotEnsemble { +test interp-1.7 {options for interp command} { list [catch {interp hello} msg] $msg } {1 {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.8 {options for interp command} interpNotEnsemble { +test interp-1.8 {options for interp command} { list [catch {interp -froboz} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.9 {options for interp command} interpNotEnsemble { +test interp-1.9 {options for interp command} { list [catch {interp -froboz -safe} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.10 {options for interp command} { @@ -2369,11 +2368,13 @@ test interp-28.2 {master's nsName cache should not cross} -setup { $i eval { set x {namespace children ::} set y [list namespace children ::] - set j [interp create] namespace delete {*}[{*}$y] + set j [interp create] $j eval {namespace delete {*}[namespace children ::]} namespace eval foo {} - list [eval $x] [eval $y] [$j eval $x] [$j eval $y] + set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] + interp delete $j + set res } } -cleanup { interp delete $i @@ -2567,8 +2568,8 @@ test interp-29.3.4 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {5+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 5 + set x ok } } } @@ -2588,8 +2589,8 @@ test interp-29.3.5 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {4+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 4 + set x ok } } } @@ -2609,8 +2610,8 @@ test interp-29.3.6 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {6+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 6 + set x ok } } } |