summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-12 19:10:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-12 19:10:49 (GMT)
commit315198312f0b545b058b63918b6d0497d3f44b0c (patch)
treece31b499628b3e634f5497bec9f5b2b7160d726d /tests
parent0a78bbbd2192fb9210fb701537a53b9bf225c8dd (diff)
downloadtcl-315198312f0b545b058b63918b6d0497d3f44b0c.zip
tcl-315198312f0b545b058b63918b6d0497d3f44b0c.tar.gz
tcl-315198312f0b545b058b63918b6d0497d3f44b0c.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]
Diffstat (limited to 'tests')
-rw-r--r--tests/namespace.test16
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 {