diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-10-09 14:41:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-10-09 14:41:06 (GMT) |
commit | cf0445d0ebfd0fced4bf52e23e58789b661f1f6a (patch) | |
tree | 2c40948bd6348456fbd7e6a7c6910b8f3d59d5d7 /tests | |
parent | 946de36dddaaf07e1288122e7f6e517074f21e89 (diff) | |
download | tcl-cf0445d0ebfd0fced4bf52e23e58789b661f1f6a.zip tcl-cf0445d0ebfd0fced4bf52e23e58789b661f1f6a.tar.gz tcl-cf0445d0ebfd0fced4bf52e23e58789b661f1f6a.tar.bz2 |
* generic/tclCompCmds.c (TclCompileDictWithCmd): Corrected handling of
qualified names, and added spacial cases for empty bodies (used when
[dict with] is just used for extracting variables).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dict.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/dict.test b/tests/dict.test index 41c21e2..87e5107 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -1424,6 +1424,54 @@ test dict-22.17 {dict with: compiled} { array get d }} e } {e {p {q {a 2.1 b 2}}}} +test dict-22.18 {dict with: compiled} { + set ::d {a 1 b 2} + apply {{} { + dict with ::d { + set a $b.$a + } + return $::d + }} +} {a 2.1 b 2} +test dict-22.19 {dict with: compiled} { + set ::d {p {q {r {a 1 b 2}}}} + apply {{} { + dict with ::d p q r { + set a $b.$a + } + return $::d + }} +} {p {q {r {a 2.1 b 2}}}} +test dict-22.20 {dict with: compiled} { + apply {d { + dict with d { + } + return $a,$b + }} {a 1 b 2} +} 1,2 +test dict-22.21 {dict with: compiled} { + apply {d { + dict with d p q { + } + return $a,$b + }} {p {q {a 1 b 2}}} +} 1,2 +test dict-22.22 {dict with: compiled} { + set ::d {a 1 b 2} + apply {{} { + dict with ::d { + } + return $a,$b + }} +} 1,2 +test dict-22.23 {dict with: compiled} { + set ::d {p {q {a 1 b 2}}} + apply {{} { + dict with ::d p q { + } + return $a,$b + }} +} 1,2 # cleanup ::tcltest::cleanupTests |