summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-10 22:00:20 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-10 22:00:20 (GMT)
commit9a6fd67901f76dc489e1231a88e5f2a09c2abce7 (patch)
treeacb53ac0c8664c31add9aabf1d238f836e1aeb3a /tests
parent24aa206133a4afbd09b359bada47423e68d7c056 (diff)
downloadtk-9a6fd67901f76dc489e1231a88e5f2a09c2abce7.zip
tk-9a6fd67901f76dc489e1231a88e5f2a09c2abce7.tar.gz
tk-9a6fd67901f76dc489e1231a88e5f2a09c2abce7.tar.bz2
Fixed textDisp-4.1 and -4.2 - The expected test results were not relevant without the update between deletion and insertionbug_7703f947aa
Diffstat (limited to 'tests')
-rw-r--r--tests/textDisp.test12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 471a096..678ad4e 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -537,20 +537,24 @@ test textDisp-4.1 {UpdateDisplayInfo, basic} {textfonts} {
.t insert end "Line 1\nLine 2\nLine 3\n"
update
.t delete 2.0 2.end
+ update
+ set res $tk_textRelayout
.t insert 2.0 "New Line 2"
update
- list [.t bbox 1.0] [.t bbox 2.0] [.t bbox 3.0] $tk_textRelayout
-} [list [list 5 5 7 $fixedHeight] [list 5 [expr {$fixedDiff + 18}] 7 $fixedHeight] [list 5 [expr {2*$fixedDiff + 31}] 7 $fixedHeight] 2.0]
+ lappend res [.t bbox 1.0] [.t bbox 2.0] [.t bbox 3.0] $tk_textRelayout
+} [list 2.0 [list 5 5 7 $fixedHeight] [list 5 [expr {$fixedDiff + 18}] 7 $fixedHeight] [list 5 [expr {2*$fixedDiff + 31}] 7 $fixedHeight] 2.0]
test textDisp-4.2 {UpdateDisplayInfo, re-use tail of text line} {textfonts} {
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
update
.t mark set x 2.21
.t delete 2.2
+ update
+ set res $tk_textRelayout
.t insert 2.0 X
update
- list [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout
-} [list [list 5 [expr {$fixedDiff + 18}] 7 $fixedHeight] [list 12 [expr {2*$fixedDiff + 31}] 7 $fixedHeight] [list 5 [expr {3*$fixedDiff + 44}] 7 $fixedHeight] {2.0 2.20}]
+ lappend res [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout
+} [list 2.0 2.20 [list 5 [expr {$fixedDiff + 18}] 7 $fixedHeight] [list 12 [expr {2*$fixedDiff + 31}] 7 $fixedHeight] [list 5 [expr {3*$fixedDiff + 44}] 7 $fixedHeight] {2.0 2.20}]
test textDisp-4.3 {UpdateDisplayInfo, tail of text line shifts} {textfonts} {
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"