summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-05-23 22:53:18 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-05-23 22:53:18 (GMT)
commitf606211e0c51995aea56b201d27556a45c10109c (patch)
treeced351781e4a4d76a53b7dd645aabb4c988d1e6d /tests/namespace.test
parent0463c49be94c19a4a433c4657f8e565e80e1b0b3 (diff)
downloadtcl-f606211e0c51995aea56b201d27556a45c10109c.zip
tcl-f606211e0c51995aea56b201d27556a45c10109c.tar.gz
tcl-f606211e0c51995aea56b201d27556a45c10109c.tar.bz2
* generic/tclNamesp.c (Tcl_FindNamespaceVar): [Bug 959052] fixed,
insuring that no "zombie" variables are found. * generic/tclVar.c (TclLookupSimpleVar): comments re [Bug 736729] (predecessor of [Bug 959052]) removed. * tests/namespace.test: added tests 17.10-12
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test26
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}