summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/var.test b/tests/var.test
index a7950be..7ff394e 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -865,14 +865,19 @@ test var-20.8 {array set compilation correctness: Bug 3603163} -setup {
}}
array size x
} -result 0
-test var-20.9 {[bc1a96407a] array set compiled w/ trace} {
+test var-20.9 {[bc1a96407a] array set compiled w/ trace} -setup {
variable foo
+ variable lambda
+ unset -nocomplain lambda foo
+ array set foo {}
lappend lambda {}
lappend lambda [list array set [namespace which -variable foo] {a 1}]
+} -body {
after 0 [list apply $lambda]
vwait [namespace which -variable foo]
+} -cleanup {
unset -nocomplain lambda foo
-} {}
+} -result {}
test var-20.10 {[bc1a96407a] array set don't compile bad varname} -body {
apply {{} {set name foo(bar); array set $name {a 1}}}
} -returnCodes error -match glob -result *