summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-11-22 23:04:15 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-11-22 23:04:15 (GMT)
commit567a2113a4b476c36f3c2a8ee85172ef7c361f65 (patch)
treeca63d8f48ef3de16403945b4f136ea53931a07d1 /tests
parent63bc8b0324a647da4fdb5618dd8b973ecf2aae87 (diff)
parent94831611278c36aeb3cea4a1e509446ead130ba9 (diff)
downloadtk-567a2113a4b476c36f3c2a8ee85172ef7c361f65.zip
tk-567a2113a4b476c36f3c2a8ee85172ef7c361f65.tar.gz
tk-567a2113a4b476c36f3c2a8ee85172ef7c361f65.tar.bz2
Merged from branch bug-c24b97d905
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test36
1 files changed, 35 insertions, 1 deletions
diff --git a/tests/text.test b/tests/text.test
index 52689ba..6121b85 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -698,7 +698,41 @@ test text-9.2.44 {TextWidgetCmd procedure, "count" option} -setup {
.t tag add hidden 2.9 3.17
.t tag configure hidden -elide true
lappend res [.t count -displaylines 1.19 3.24] [.t count -displaylines 1.0 end]
-} -result {2 6 2 5}
+} -result {2 6 1 5}
+test text-9.2.45 {TextWidgetCmd procedure, "count" option} -setup {
+ .t delete 1.0 end
+ update
+ set res {}
+} -body {
+ for {set i 1} {$i < 5} {incr i} {
+ .t insert end "Line $i+++Line $i---Line $i///Line $i - This is Line [format %c [expr 64+$i]]\n"
+ }
+ .t tag configure hidden -elide true
+ .t tag add hidden 2.15 3.10
+ .t configure -wrap none
+ set res [.t count -displaylines 2.0 3.0]
+} -result {0}
+test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
+ toplevel .mytop
+ pack [text .mytop.t]
+ wm geometry .mytop 100x300+0+0
+ .mytop.t delete 1.0 end
+ update
+ set res {}
+} -body {
+ for {set i 1} {$i < 5} {incr i} {
+ # 0 1 2 3 4
+ # 012345 678901234 567890123 456789012 34567890123456789
+ .mytop.t insert end "Line $i+++Line $i---Line $i///Line $i - This is Line [format %c [expr 64+$i]]\n"
+ }
+ .mytop.t tag configure hidden -elide true
+ .mytop.t tag add hidden 2.15 3.10
+ .mytop.t configure -wrap char
+ lappend res [.mytop.t count -displaylines 2.0 3.0]
+ lappend res [.mytop.t count -displaylines 2.0 3.40]
+} -cleanup {
+ destroy .mytop
+} -result {1 3}
# Newer tags are higher priority
.t tag configure elide1 -elide 0