summaryrefslogtreecommitdiffstats
path: root/tests/listbox.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-18 15:54:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-18 15:54:13 (GMT)
commite020f123dd78dcc7057325fd9ceb975a5cbb0e7e (patch)
treec6534271ff56f9a366bf5c00d9b12be62b082d20 /tests/listbox.test
parent02a13283dabde79912bb8b787eff9fda846b8f5e (diff)
downloadtk-e020f123dd78dcc7057325fd9ceb975a5cbb0e7e.zip
tk-e020f123dd78dcc7057325fd9ceb975a5cbb0e7e.tar.gz
tk-e020f123dd78dcc7057325fd9ceb975a5cbb0e7e.tar.bz2
Clamp "listbox index" values between -1 and (maximum) end+1, as done in other GUI elements too (like menu).
Diffstat (limited to 'tests/listbox.test')
-rw-r--r--tests/listbox.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index e9a2f28..f994e45 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -724,7 +724,7 @@ test listbox-3.62 {ListboxWidgetCmd procedure, "index" option} -body {
} -result 18
test listbox-3.63 {ListboxWidgetCmd procedure, "index" option} -body {
.l index 34
-} -result 34
+} -result 19
test listbox-3.64 {ListboxWidgetCmd procedure, "insert" option} -body {
.l insert
} -returnCodes error -result {wrong # args: should be ".l insert index ?element ...?"}
@@ -2112,7 +2112,7 @@ test listbox-10.17 {GetListboxIndex procedure} -setup {
.l index 20
} -cleanup {
destroy .l
-} -result {20}
+} -result {13}
test listbox-10.18 {GetListboxIndex procedure} -setup {
destroy .l
} -body {