diff options
author | dgp <dgp@noemail.net> | 2007-03-12 19:10:49 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2007-03-12 19:10:49 (GMT) |
commit | 02dc79f6676724c107ee4df25361cea89b2eff85 (patch) | |
tree | ce31b499628b3e634f5497bec9f5b2b7160d726d /tests | |
parent | 5d5f002b757fa8a8033728bce8bcba556fe14328 (diff) | |
download | tcl-02dc79f6676724c107ee4df25361cea89b2eff85.zip tcl-02dc79f6676724c107ee4df25361cea89b2eff85.tar.gz tcl-02dc79f6676724c107ee4df25361cea89b2eff85.tar.bz2 |
* generic/tclNamesp.c (NsEnsembleImplementationCmd): Make efficient
* tests/namespace.test (namespace-42.8): private copy of the
command prefix as we invoke the command appropriate to a particular
subcommand of a particular ensemble to avoid panic due to shimmering
of the List intrep. [Bug 1670091]
FossilOrigin-Name: b632f11ec5e6b9bbb117c3925f540f9ba01aab1a
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index a8e9fd5..f8433cc 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.65 2007/02/08 18:43:41 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.66 2007/03/12 19:10:50 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1547,6 +1547,20 @@ test namespace-42.7 {ensembles: nested} { namespace delete ns set result } {{1 ::ns::x0::z} 1 2 3} +test namespace-42.8 {ensembles: [Bug 1670091]} -setup { + proc demo args {} + variable target [list [namespace which demo] x] + proc trial args {variable target; string length $target} + trace add execution demo enter [namespace code trial] + namespace ensemble create -command foo -map [list bar $target] +} -body { + foo bar +} -cleanup { + unset target + rename demo {} + rename trial {} + rename foo {} +} -result {} test namespace-43.1 {ensembles: dict-driven} { namespace eval ns { |