summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm>1999-11-24 01:09:07 (GMT)
committerericm <ericm>1999-11-24 01:09:07 (GMT)
commitabcfd77cbde42a883ece9a8db050e42b6ef9c45a (patch)
tree8b0902880bc85aa2e058c060030c624d97c571a3 /tests
parentbe89e43c7fbc9554b9b1daa5a2ad02eb3be030b7 (diff)
downloadtk-abcfd77cbde42a883ece9a8db050e42b6ef9c45a.zip
tk-abcfd77cbde42a883ece9a8db050e42b6ef9c45a.tar.gz
tk-abcfd77cbde42a883ece9a8db050e42b6ef9c45a.tar.bz2
* tests/listbox.test: Added a test to check that the topIndex is
update when items are removed from the listvar variable. * generic/tkListbox.c: Added a check the updates the topIndex when items are removed from the listvar variable.
Diffstat (limited to 'tests')
-rw-r--r--tests/listbox.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index 3a20c07..886dfe1 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: listbox.test,v 1.10 1999/11/24 00:20:14 ericm Exp $
+# RCS: @(#) $Id: listbox.test,v 1.11 1999/11/24 01:09:08 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -1896,6 +1896,25 @@ test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} {
update
set log
} [list {y 0 1} {y 0 0.5}]
+test listbox-21.16 {ListboxListVarProc, update vertical scrollbar} {
+ catch {destroy .l}
+ catch {unset x}
+ listbox .l -listvar x -height 3
+ pack .l
+ update
+ set x [list 0 1 2 3 4 5]
+ .l yview scroll 3 units
+ update
+ set result {}
+ lappend result [.l yview]
+ set x [lreplace $x 3 3]
+ set x [lreplace $x 3 3]
+ set x [lreplace $x 3 3]
+ update
+ lappend result [.l yview]
+ set result
+} [list {0.5 1} {0 1}]
+
# UpdateHScrollbar
test listbox-22.1 {UpdateHScrollbar} {
catch {destroy .l}