summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test4
-rw-r--r--tests/textDisp.test15
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/text.test b/tests/text.test
index 6bd0ae4..9ee0eff 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -7419,10 +7419,10 @@ test text-32.3 {peer widget -start, -end and deletion (bug 1630262)} -setup {
.pt delete 2.0 3.0
# moreover -startline shall be correct
# (was wrong before fixing bug 1630262)
- lappend res [.t cget -start] [.pt cget -start]
+ lappend res [.t cget -start] [.pt cget -start] [.t get @0,0 "@0,0 lineend"]
} -cleanup {
destroy .pt
-} -result {4 3}
+} -result {4 3 {Line 5}}
test text-32.4 {peer widget -start, -end and deletion (bug 1630262)} -setup {
destroy .t .pt
diff --git a/tests/textDisp.test b/tests/textDisp.test
index ac80069..b35a107 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -1660,6 +1660,21 @@ test textDisp-11.21 {TkTextSetYView, window height smaller than the line height}
.top.t see 1.0
.top.t index @0,[expr {$lineheight - 2}]
} {1.0}
+test textDisp-11.22 {TkTextSetYView, peer has -startline} {
+ .top.t delete 1.0 end
+ for {set i 1} {$i <= 50} {incr i} {
+ .top.t insert end "Line $i\n"
+ }
+ pack [.top.t peer create .top.p] -side left
+ pack [scrollbar .top.sb -command {.top.p yview}] -side left -fill y
+ .top.p configure -startline 5 -endline 35 -yscrollcommand {.top.sb set}
+ updateText
+ .top.p yview moveto 0
+ updateText
+ set res [.top.p get @0,0 "@0,0 lineend"]
+ destroy .top.p
+ set res
+} {Line 5}
.t configure -wrap word
.t delete 50.0 51.0