summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-05-25 19:45:14 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-05-25 19:45:14 (GMT)
commiteb15d5b60d298079a384b538aa00c53ece4309b6 (patch)
tree317d61a35fb6a8871ec0628c42c70173e7fa8302 /tests
parent189bfa75c643b2ca02afef7fe20837322f2fc382 (diff)
downloadtcl-eb15d5b60d298079a384b538aa00c53ece4309b6.zip
tcl-eb15d5b60d298079a384b538aa00c53ece4309b6.tar.gz
tcl-eb15d5b60d298079a384b538aa00c53ece4309b6.tar.bz2
* generic/tclNamesp.c (Tcl_FindNamespaceVar):
* tests/namespace.test (namespace-17.10-12): reverted commit of 2004-05-23 and removed the tests, as it interferes with the varname resolver and there are apps that break (AlphaTk). A fix will have to wait for Tcl9. * generic/tclVar.c: Caching of namespace variables disabled: no simple way was found to avoid interfering with the resolver's idea of variable existence. A cached varName may keep a variable's name in the namespace's hash table, which is the resolver's criterion for existence. * tests/namespace.c (namespace-17.10): testing for interference between varname caching and name resolver.
Diffstat (limited to 'tests')
-rw-r--r--tests/namespace.test38
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}