summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-19 20:41:39 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-19 20:41:39 (GMT)
commit6417057da4721d7765152c15451d46ddfe23f7f5 (patch)
treedac1a189383cad8eb1dece91db97665a4f9d10f3 /tests
parente70967071c3cadbe8e53ee3136451edaf78c98c9 (diff)
parent6bc08bebbd4985473021dabe1e9a6c9128e58d99 (diff)
downloadtk-6417057da4721d7765152c15451d46ddfe23f7f5.zip
tk-6417057da4721d7765152c15451d46ddfe23f7f5.tar.gz
tk-6417057da4721d7765152c15451d46ddfe23f7f5.tar.bz2
Robustified text-9.2.46, which failed on Linux Debian 6.0 (bug [cc0ba31920])
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/text.test b/tests/text.test
index 95fd4b2..746e998 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -2651,22 +2651,23 @@ test text-9.2.45 {TextWidgetCmd procedure, "count" option} -setup {
} -result {0}
test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
toplevel .mytop
- pack [text .mytop.t]
- wm geometry .mytop 100x300+0+0
+ pack [text .mytop.t -font TkFixedFont -bd 0 -padx 0 -wrap char]
+ set spec [font measure TkFixedFont "Line 1+++Line 1---Li"] ; # 20 chars
+ append spec x300+0+0
+ wm geometry .mytop $spec
.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
+ # 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.20 3.10
- .mytop.t configure -wrap char
+ .mytop.t tag add hidden 2.30 3.10
lappend res [.mytop.t count -displaylines 2.0 3.0]
- lappend res [.mytop.t count -displaylines 2.0 3.40]
+ lappend res [.mytop.t count -displaylines 2.0 3.50]
} -cleanup {
destroy .mytop
} -result {1 3}