summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-02-02 06:02:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-02-02 06:02:41 (GMT)
commit558cb6ad68272433faff4c01314fad2d63c1bfc3 (patch)
tree046641e3a9fe0dcfbfad92e254936bf0e05e8e77 /tests
parent0c355e47e82f42d8d8988dc9eebadb524f1cc772 (diff)
downloadtcl-558cb6ad68272433faff4c01314fad2d63c1bfc3.zip
tcl-558cb6ad68272433faff4c01314fad2d63c1bfc3.tar.gz
tcl-558cb6ad68272433faff4c01314fad2d63c1bfc3.tar.bz2
* generic/tclInterp.c: Reverted the conversion of [interp] into an
* tests/interp.test: ensemble. Such conversion is not necessary * tests/nre.test: (or even all that helpful) in the NRE-enabling of [interp invokehidden], and it has other implications -- including significant forkage of the 8.5 and 8.6 implementations -- that are better off avoided if there's no gain.
Diffstat (limited to 'tests')
-rw-r--r--tests/interp.test31
-rw-r--r--tests/nre.test8
2 files changed, 21 insertions, 18 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
}
}
}
diff --git a/tests/nre.test b/tests/nre.test
index 873eb14..dd86e18 100644
--- a/tests/nre.test
+++ b/tests/nre.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: nre.test,v 1.7 2009/01/29 17:13:50 dgp Exp $
+# RCS: @(#) $Id: nre.test,v 1.8 2009/02/02 06:02:41 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -394,11 +394,13 @@ test nre-X.1 {eval in wrong interp} {
set res [$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
}]
interp delete $i
set res