summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-09-24 14:43:28 (GMT)
committervincentdarley <vincentdarley>2004-09-24 14:43:28 (GMT)
commit46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b (patch)
treeab9312a555ad17a539323d76457c691bc01f9490 /tests/textDisp.test
parent00f74438c9deed2111133ed89d2fedab3ff1990d (diff)
downloadtk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.zip
tk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.tar.gz
tk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.tar.bz2
more robust text widget display tests
Diffstat (limited to 'tests/textDisp.test')
-rw-r--r--tests/textDisp.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 2e94e2f..2cbb613 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.29 2004/06/24 12:46:30 dkf Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.30 2004/09/24 14:43:30 vincentdarley Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -914,7 +914,7 @@ test textDisp-6.6 {scrolling in DisplayText, Expose events after scroll} {unix n
test textDisp-6.7 {DisplayText, vertical scrollbar updates} {
.t configure -wrap char
.t delete 1.0 end
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set scrollInfo
} {0.0 1.0}
test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
@@ -926,7 +926,7 @@ test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13} {
.t insert end "\nLine $i"
}
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set scrollInfo
} {0.0 0.769230769231}
.t configure -yscrollcommand {} -xscrollcommand scroll
@@ -1145,7 +1145,7 @@ test textDisp-8.11 {TkTextChanged, scrollbar notification when changes are off-s
.t insert end "a\nb\nc\n"
# We need to wait for our asychronous callbacks to update the
# scrollbar
- update ; after 50; update
+ update ; .t count -update -ypixels 1.0 end ; update
.t configure -yscrollcommand ""
set scrollInfo
} {0.0 0.625}
@@ -2506,7 +2506,7 @@ test textDisp-19.16 {count -ypixels} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a bit left on the last line."
# Need to update so everything is calculated.
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set res {}
lappend res \
[.t count -ypixels 1.0 end] \
@@ -3548,7 +3548,7 @@ test textDisp-33.3 {one line longer than fits in the widget} {
.tt debug 1
set tk_textHeightCalc ""
.tt insert 1.0 [string repeat "more wrap + " 300]
- after 100 ; update
+ update ; .tt count -update -ypixels 1.0 end ; update
# Each line should have been recalculated just once
.tt debug 0
expr {[llength $tk_textHeightCalc] == [.tt count -displaylines 1.0 end]}