diff options
author | dgp <dgp@users.sourceforge.net> | 2016-07-18 16:50:22 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-07-18 16:50:22 (GMT) |
commit | b40d7eb1f9fd438d96313292e9ff667799c7e911 (patch) | |
tree | 3762476e74c48c880cd6ab66a29d7202b771a124 /tests/namespace.test | |
parent | 9cc388df3d06570e47d68f284a74f4fa26b45426 (diff) | |
parent | 3766e26550a1315f09945ab1162d78d0143d32a2 (diff) | |
download | tcl-b40d7eb1f9fd438d96313292e9ff667799c7e911.zip tcl-b40d7eb1f9fd438d96313292e9ff667799c7e911.tar.gz tcl-b40d7eb1f9fd438d96313292e9ff667799c7e911.tar.bz2 |
[104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cached channel name lookups.
Also merge backlog of test suite & doc improvements.
Diffstat (limited to 'tests/namespace.test')
-rw-r--r-- | tests/namespace.test | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index 0bbf2f7..f6f817b 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -846,6 +846,7 @@ test namespace-17.1 {Tcl_FindNamespaceVar, absolute name found} -setup { set ::x } } -result {314159} +variable ::x 314159 test namespace-17.2 {Tcl_FindNamespaceVar, absolute name found} { namespace eval test_ns_1 { variable x 777 @@ -889,23 +890,25 @@ test namespace-17.6 {Tcl_FindNamespaceVar, relative name found} -setup { } -result {777} test namespace-17.7 {Tcl_FindNamespaceVar, relative name found} { namespace eval test_ns_1 { + variable x 777 unset x set x ;# must be global x now } } {314159} -test namespace-17.8 {Tcl_FindNamespaceVar, relative name not found} { +test namespace-17.8 {Tcl_FindNamespaceVar, relative name not found} -body { namespace eval test_ns_1 { - list [catch {set wuzzat} msg] $msg + set wuzzat } -} {1 {can't read "wuzzat": no such variable}} +} -returnCodes error -result {can't read "wuzzat": no such variable} test namespace-17.9 {Tcl_FindNamespaceVar, relative name and TCL_GLOBAL_ONLY} { namespace eval test_ns_1 { variable a hello } set test_ns_1::a } {hello} -test namespace-17.10 {Tcl_FindNamespaceVar, interference with cached varNames} { +test namespace-17.10 {Tcl_FindNamespaceVar, interference with cached varNames} -setup { namespace eval test_ns_1 {} +} -body { proc test_ns {} { set ::test_ns_1::a 0 } @@ -916,7 +919,7 @@ test namespace-17.10 {Tcl_FindNamespaceVar, interference with cached varNames} { namespace eval test_ns_1 set a 1 namespace delete test_ns_1 return $a -} 1 +} -result 1 catch {unset a} catch {unset x} |