diff options
author | msofer <msofer@noemail.net> | 2001-04-07 02:08:04 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2001-04-07 02:08:04 (GMT) |
commit | 223966c7053de95f2a52bc2ec0a76565e4948068 (patch) | |
tree | 27e01be7c5657ec2023a9068839d964791e9e29d /tests/namespace.test | |
parent | 93d49707aa39f679fcfe9480869072dd75e2bcdd (diff) | |
download | tcl-223966c7053de95f2a52bc2ec0a76565e4948068.zip tcl-223966c7053de95f2a52bc2ec0a76565e4948068.tar.gz tcl-223966c7053de95f2a52bc2ec0a76565e4948068.tar.bz2 |
Corrected behaviour of [namespace code] (bug #219385, patch #403530)
FossilOrigin-Name: be05dac289c878a93efbe98a94e422df3cf27f48
Diffstat (limited to 'tests/namespace.test')
-rw-r--r-- | tests/namespace.test | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index da884eb..234f90b 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.13 2000/05/11 00:17:29 hobbs Exp $ +# RCS: @(#) $Id: namespace.test,v 1.14 2001/04/07 02:12:30 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -694,12 +694,23 @@ test namespace-22.3 {NamespaceCodeCmd, arg is already scoped value} { } {namespace inscope ::test_ns_1 cmd} test namespace-22.4 {NamespaceCodeCmd, in :: namespace} { namespace code unknown -} {namespace inscope :: unknown} +} {::namespace inscope :: unknown} test namespace-22.5 {NamespaceCodeCmd, in other namespace} { namespace eval test_ns_1 { namespace code cmd } -} {namespace inscope ::test_ns_1 cmd} +} {::namespace inscope ::test_ns_1 cmd} +test namespace-22.6 {NamespaceCodeCmd, in other namespace} { + namespace eval test_ns_1 { + variable v 42 + } + namespace eval test_ns_2 { + proc namespace args {} + } + namespace eval test_ns_2 [namespace eval test_ns_1 { + namespace code {set v} + }] +} {42} test namespace-23.1 {NamespaceCurrentCmd, bad args} { catch {eval namespace delete [namespace children :: test_ns_*]} |