summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-04-17 19:14:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-04-17 19:14:01 (GMT)
commit62ea5e49a10037bf3a3896a933db4951ff0b15bc (patch)
tree9ea7d3515f386687ea40f65a8535430ae052a739 /tests
parent5dff80f2fe38009bc7e7c6b3f74033a8a05a59a1 (diff)
downloadtcl-62ea5e49a10037bf3a3896a933db4951ff0b15bc.zip
tcl-62ea5e49a10037bf3a3896a933db4951ff0b15bc.tar.gz
tcl-62ea5e49a10037bf3a3896a933db4951ff0b15bc.tar.bz2
Array trace firing must come before argument checking might raise error.
Diffstat (limited to 'tests')
-rw-r--r--tests/var.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/var.test b/tests/var.test
index d1340f6..01080bc 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -939,6 +939,19 @@ test var-20.11 {array set don't compile bad initializer} -setup {
} -cleanup {
unset -nocomplain foo
} -result baz
+test var-20.12 {array set don't compile bad initializer} -setup {
+ unset -nocomplain ::foo
+ trace add variable ::foo array {set ::foo(bar) baz;#}
+} -body {
+ catch {apply {{} {
+ set value bad
+ array set ::foo $value
+
+ }}}
+ set ::foo(bar)
+} -cleanup {
+ unset -nocomplain ::foo
+} -result baz
test var-21.0 {PushVarNameWord OBOE in compiled unset} -setup {
proc linenumber {} {dict get [info frame -1] line}