aboutsummaryrefslogtreecommitdiff
path: root/tests/dict2.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-02-24 12:59:56 +1000
committerSteve Bennett <steveb@workware.net.au>2023-02-24 13:02:31 +1000
commit7eb6fdddafb7ee98afd8dc170a23bfbb32708994 (patch)
tree9cfdb2dc8baffea9d0c58286b06be4c3c550f62d /tests/dict2.test
parent23603d8c3d482a9f92a949c9da1c71a0c8e68343 (diff)
downloadjimtcl-7eb6fdddafb7ee98afd8dc170a23bfbb32708994.zip
jimtcl-7eb6fdddafb7ee98afd8dc170a23bfbb32708994.tar.gz
jimtcl-7eb6fdddafb7ee98afd8dc170a23bfbb32708994.tar.bz2
dict with: return script result
Previously dict with returned the new dict value. Also fix an issue in the case where a dict element mirrors the name of the dictionary. Fixes: #241 Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/dict2.test')
-rw-r--r--tests/dict2.test9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/dict2.test b/tests/dict2.test
index 99cf605..573d17a 100644
--- a/tests/dict2.test
+++ b/tests/dict2.test
@@ -1272,8 +1272,13 @@ test dict-23.4 {dict with usage} -body {
} -returnCodes error -result {wrong # args: should be "dict with dictVar ?key ...? script"}
test dict-23.5 {dict with badvar} -constraints jim -body {
- dict with dictnulls {lsort [info locals]}
-} -returnCodes ok -result [list ab\0c de\0f \0ghi kl\0m]
+ proc a {dict} {
+ dict with dict {
+ lsort [info locals]
+ }
+ }
+ a $dictnulls
+} -returnCodes ok -result [list \0ghi ab\0c dict]
test dict-23.6 {dict with baddict} -body {
dict with dictbad {}