diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index 3193761..e22eb13 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.27 2004/05/25 18:58:04 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.28 2004/05/25 19:45:17 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -560,30 +560,20 @@ 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 +test namespace-17.10 {Tcl_FindNamespaceVar, interference with cached varNames} { + namespace eval test_ns_1 {} + proc test_ns {} { + set ::test_ns_1::a 0 + } + test_ns + rename test_ns {} + namespace eval test_ns_1 unset a + set a 0 + namespace eval test_ns_1 set a 1 + namespace delete test_ns_1 + set a } 1 - +catch {unset a} catch {unset x} catch {unset l} |