summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/var.test b/tests/var.test
index b235e5d..8d86fce 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -776,6 +776,22 @@ test var-13.1 {Tcl_UnsetVar2, unset array with trace set on element} -setup {
}
set x "If you see this, it worked"
} -result "If you see this, it worked"
+test var-13.2 {unset array with search, bug 46a2410650} -body {
+ apply {{} {
+ array set a {aa 11 bb 22 cc 33 dd 44 ee 55 ff 66}
+ set s [array startsearch a]
+ unset a([array nextelement a $s])
+ array nextelement a $s
+ }}
+} -returnCodes error -result {couldn't find search "s-1-a"}
+test var-13.3 {unset array with search, SIGSEGV, bug 46a2410650} -body {
+ apply {{} {
+ array set a {aa 11 bb 22 cc 33 dd 44 ee 55 ff 66}
+ set s [array startsearch a]
+ unset a(ff)
+ array nextelement a $s
+ }}
+} -returnCodes error -result {couldn't find search "s-1-a"}
test var-14.1 {array names syntax} -body {
array names foo bar baz snafu