diff options
author | dgp <dgp@noemail.net> | 2007-02-08 18:43:38 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2007-02-08 18:43:38 (GMT) |
commit | 23dd89f0dae54ea39059f779a20cee4f09580cdc (patch) | |
tree | a5d163800f404b2adc298006d04a55765032f8ce /tests | |
parent | 84c6eeb0d8999629772c00edd41de7cd41f852f2 (diff) | |
download | tcl-23dd89f0dae54ea39059f779a20cee4f09580cdc.zip tcl-23dd89f0dae54ea39059f779a20cee4f09580cdc.tar.gz tcl-23dd89f0dae54ea39059f779a20cee4f09580cdc.tar.bz2 |
* generic/tclNamesp.c: Corrected broken logic in Tcl_DeleteNamespace()
* tests/namespace.test: introduced in Patch 1577278 that caused
[namespace delete ::] to be effective only at level #0. New test
namespace-7.7 should prevent similar error in the future. [Bug 1655305]
FossilOrigin-Name: 10b8242e8a21ff2873245b96416e5e910869042c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index b712f01..a8e9fd5 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.64 2007/02/06 21:08:07 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.65 2007/02/08 18:43:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -148,7 +148,6 @@ test namespace-7.3 {recursive Tcl_DeleteNamespace, active call frames in ns} { } {} test namespace-7.4 {recursive Tcl_DeleteNamespace, active call frames in ns} { # [Bug 1355942] - # Currently fails due to [Bug 1355342] namespace eval test_ns_2 { proc x {} {} trace add command x delete "namespace delete [namespace current];#" @@ -165,13 +164,26 @@ test namespace-7.5 {recursive Tcl_DeleteNamespace, no active call frames in ns} } {} test namespace-7.6 {recursive Tcl_DeleteNamespace, no active call frames in ns} { # [Bug 1355942] - # Currently fails due to [Bug 1355342] namespace eval test_ns_2 { proc x {} {} trace add command x delete "namespace delete [namespace current];#" } namespace delete test_ns_2 } {} +test namespace-7.7 {Bug 1655305} -setup { + interp create slave + slave hide info + slave eval { + proc foo {} { + namespace delete :: + } + } +} -body { + slave eval foo + slave invokehidden info commands +} -cleanup { + interp delete slave +} -result {} test namespace-8.1 {TclTeardownNamespace, delete global namespace} { @@ -2350,7 +2362,6 @@ test namespace-51.12 {name resolution path control} -body { } test namespace-51.13 {name resolution path control} -body { - # Currently fails due to [Bug 1355342] set ::result {} namespace eval ::test_ns_1 { proc foo {} {lappend ::result 1} |