diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-17 22:30:06 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-17 22:30:06 (GMT) |
commit | 3c942c50d91bc8ea58c64065922babf397943e8f (patch) | |
tree | b2bbd710aecb79f626a50dea36f5254cc2c2ab67 /tests | |
parent | 48047bb120a19ed52c13f484cc0685fe7218ae50 (diff) | |
download | tcl-3c942c50d91bc8ea58c64065922babf397943e8f.zip tcl-3c942c50d91bc8ea58c64065922babf397943e8f.tar.gz tcl-3c942c50d91bc8ea58c64065922babf397943e8f.tar.bz2 |
Fix [16fe1b5807]: namespace ensemble command named ":" is mistakenly given the
empty string as its name.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index f6f817b..220fa53 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -1784,7 +1784,7 @@ test namespace-42.7 {ensembles: nested} -body { list [ns x0 z] [ns x1] [ns x2] [ns x3] } -cleanup { namespace delete ns -} -result {{1 ::ns::x0::z} 1 2 3} +} -result {{1 z} 1 2 3} test namespace-42.8 {ensembles: [Bug 1670091]} -setup { proc demo args {} variable target [list [namespace which demo] x] @@ -2084,7 +2084,7 @@ test namespace-47.1 {ensemble: unknown handler} { lappend result [catch {ns c d e} msg] $msg lappend result [catch {ns Magic foo bar spong wibble} msg] $msg list $result [lsort [info commands ::ns::*]] $log [namespace delete ns] -} {{0 2 0 2 0 2 0 2 1 {unknown or protected subcommand "Magic"}} {::ns::Magic ::ns::a ::ns::b ::ns::c} {{making a} {running ::ns::a b c} {running ::ns::a b c} {making b} {running ::ns::b c d} {making c} {running ::ns::c d e} {unknown Magic - args = foo bar spong wibble}} {}} +} {{0 2 0 2 0 2 0 2 1 {unknown or protected subcommand "Magic"}} {::ns::Magic ::ns::a ::ns::b ::ns::c} {{making a} {running a b c} {running a b c} {making b} {running b c d} {making c} {running c d e} {unknown Magic - args = foo bar spong wibble}} {}} test namespace-47.2 {ensemble: unknown handler} { namespace eval ns { namespace export {[a-z]*} @@ -3183,7 +3183,7 @@ test namespace-53.10 {ensembles: nested rewrite} -setup { 1 {wrong # args: should be "ns z1 x a1"}\ 1 {wrong # args: should be "ns z2 x a1 a2"}\ 1 {wrong # args: should be "ns z2 x a1 a2"}\ - 1 {wrong # args: should be "::ns::x::z0"}\ + 1 {wrong # args: should be "z0"}\ 0 {1 v}\ 1 {wrong # args: should be "ns v x z2 a2"}\ 0 {2 v v2}} @@ -3267,6 +3267,18 @@ test namespace-56.3 {bug f97d4ee020: mutually-entangled deletion} { } } } {::testing::abc::def ::testing::abc::ghi} + +test namespace-56.4 {bug 16fe1b5807: names starting with ":"} { +namespace eval : { + namespace ensemble create + namespace export * + proc p1 {} { + return 16fe1b5807 + } +} + +: p1 +} 16fe1b5807 # cleanup catch {rename cmd1 {}} |