summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
commit5234a59846f046760830b06488e2d214d0b2cf04 (patch)
treeeb303b04e47fe05468dc5620171a0ee2c8453095 /tests/var.test
parent2fc3c8d6596a5d180b7f2c13451e8ec26144cb2b (diff)
parentad86656b196a9b34f2df43327c816d8099d7f3c8 (diff)
downloadtcl-5234a59846f046760830b06488e2d214d0b2cf04.zip
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.gz
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.bz2
merge trunk
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 26b4efa..0531746 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -290,7 +290,7 @@ test var-3.11 {MakeUpvar, my var looks like array elem} -setup {
} -returnCodes error -body {
set aaaaa 789789
upvar #0 aaaaa foo(bar)
-} -result {bad variable name "foo(bar)": upvar won't create a scalar variable that looks like an array element}
+} -result {bad variable name "foo(bar)": can't create a scalar variable that looks like an array element}
test var-4.1 {Tcl_GetVariableName, global variable} testgetvarfullname {
catch {unset a}
@@ -866,6 +866,22 @@ 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} -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 *
test var-21.0 {PushVarNameWord OBOE in compiled unset} -setup {
proc linenumber {} {dict get [info frame -1] line}