diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index 941fad5..7e82ccb 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.25 2004/05/22 00:10:54 msofer Exp $ +# RCS: @(#) $Id: namespace.test,v 1.26 2004/05/23 22:53:21 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -560,6 +560,30 @@ test namespace-17.9 {Tcl_FindNamespaceVar, relative name and TCL_GLOBAL_ONLY} { } set test_ns_1::a } {hello} +test namespace-17.10 {Tcl_FindNamespaceVar, do not find zombies (Bug 959052)} { + catch {unset x} + catch {namespace delete test_ns_1 } + catch {namespace delete test_ns_2} + namespace eval test_ns_1 upvar x q + namespace eval test_ns_2 set x 1 + catch {set ::x} +} 1 +test namespace-17.11 {Tcl_FindNamespaceVar, do not find zombies (Bug 959052)} { + catch {unset x} + catch {namespace delete test_ns_1} + trace add variable x write {;#} + namespace eval test_ns_1 set x 1 + catch {set ::x} +} 1 +test namespace-17.12 {Tcl_FindNamespaceVar, do not find zombies (Bug 959052)} { + catch {unset x} + catch {namespace delete test_ns_1} + namespace eval test_ns_1 {trace add variable x write {;#}} + set ::x 0 + namespace eval test_ns_1 set x 1 + set ::x +} 1 + catch {unset x} catch {unset l} |