summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-04-22 13:28:42 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-04-22 13:28:42 (GMT)
commitd513bef710d0493a82bb07fb74a37dd723a82c5d (patch)
tree28651ab9e0c403ba8a03d62db596808f7382059c /tests
parent751fe9de93be33eda7b7e4d3a8efe71e4c27d84c (diff)
parentdc6bc431e92971fa4f3d95ed3f277e4e90c8191c (diff)
downloadtcl-d513bef710d0493a82bb07fb74a37dd723a82c5d.zip
tcl-d513bef710d0493a82bb07fb74a37dd723a82c5d.tar.gz
tcl-d513bef710d0493a82bb07fb74a37dd723a82c5d.tar.bz2
merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/var.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/var.test b/tests/var.test
index b65c1d5..a279dfd 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -778,6 +778,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