summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>1999-11-24 01:09:06 (GMT)
committerericm <ericm@noemail.net>1999-11-24 01:09:06 (GMT)
commita2a2c5b268bbf65c37c4b634faf23a89c182ddbc (patch)
tree8b0902880bc85aa2e058c060030c624d97c571a3 /tests
parent0e1559dd48dcff612039fd911848fc210da3d9dd (diff)
downloadtk-a2a2c5b268bbf65c37c4b634faf23a89c182ddbc.zip
tk-a2a2c5b268bbf65c37c4b634faf23a89c182ddbc.tar.gz
tk-a2a2c5b268bbf65c37c4b634faf23a89c182ddbc.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. FossilOrigin-Name: 81be7b942d8f0551a240b0c61612819b5258c260
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}