From 7eb6fdddafb7ee98afd8dc170a23bfbb32708994 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Fri, 24 Feb 2023 12:59:56 +1000 Subject: 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 --- tests/dict2.test | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/dict2.test') 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 {} -- cgit v1.1