summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2014-12-28 18:00:53 (GMT)
committerfvogelnew1@free.fr <fvogel>2014-12-28 18:00:53 (GMT)
commitd40528cb78943f73b5454859692aae2d3ad5f130 (patch)
tree560d2accec4a866e0481421a6b8245562cbe74b0 /tests
parent1d292c6096d4fae7cc6862f404deb216384496ff (diff)
downloadtk-d40528cb78943f73b5454859692aae2d3ad5f130.zip
tk-d40528cb78943f73b5454859692aae2d3ad5f130.tar.gz
tk-d40528cb78943f73b5454859692aae2d3ad5f130.tar.bz2
Further fixed text count -ypixels with indices in elided lines, [30d6b995dc] was not always correct
Diffstat (limited to 'tests')
-rw-r--r--tests/textDisp.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 6c21700..954c1f6 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -2692,7 +2692,6 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} {
[.t count -ypixels 25.4 27.50] \
[.t count -ypixels 35.0 38.0]
.t yview 35.0
- update
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {4 * $fixedHeight}] [expr {3 * $fixedHeight}] 0 0 0 0 0 0 [expr {5 * $fixedHeight}] [expr {- 5 * $fixedHeight}] [expr {2 * $fixedHeight}] [expr {3 * $fixedHeight}] [expr {5 * $fixedHeight}]]
test textDisp-19.18 {count -ypixels with indices in elided lines} {
@@ -2712,6 +2711,19 @@ test textDisp-19.18 {count -ypixels with indices in elided lines} {
update
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {5 * $fixedHeight}] [expr {5 * $fixedHeight}]]
+test textDisp-19.19 {count -ypixels with indices in elided lines} {
+ .t configure -wrap char
+ .t delete 1.0 end
+ for {set i 1} {$i < 25} {incr i} {
+ .t insert end [string repeat "Line $i -" 6]
+ .t insert end "\n"
+ }
+ .t tag add hidden 5.27 11.0
+ .t tag configure hidden -elide true
+ .t yview 5.0
+ update
+ set res [list [.t count -ypixels 5.0 11.0] [.t count -ypixels 5.0 11.20]]
+} [list [expr {1 * $fixedHeight}] [expr {2 * $fixedHeight}]]
.t delete 1.0 end
.t insert end "Line 1"
for {set i 2} {$i <= 200} {incr i} {