Tk Source Code

Check-in [407bae5e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Robustified text-9.2.46, which failed on Linux Debian 6.0 (bug [cc0ba31920])
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 407bae5e576b5ef766fa124b93f3f3736d725e26
User & Date: fvogel 2015-10-19 20:41:39
Context
2016-04-19
17:09
Fork of Tk used in the "Little" project. http://www.mcvoy.com/lm/little/index.html check-in: 78772485 user: dgp tags: little
2015-10-22
21:53
Fixed bug [1520118fff] - -validate resets to none check-in: c020d102 user: fvogel tags: trunk
2015-10-19
20:41
Robustified text-9.2.46, which failed on Linux Debian 6.0 (bug [cc0ba31920]) check-in: 407bae5e user: fvogel tags: trunk
20:32
Robustified text-9.2.46, which failed on Linux Debian 6.0 (bug [cc0ba31920]) check-in: 68d70a48 user: fvogel tags: core-8-5-branch
2015-10-13
13:47
Fix [908b78de9a6534d6]: winDialog.test terminates in error check-in: cbbfe02b user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/text.test.

2647
2648
2649
2650
2651
2652
2653
2654


2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
    .t configure -wrap none
    set res [.t count -displaylines 2.0 3.0]
} -cleanup {
    destroy .t
} -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.20 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}
test text-9.2.47 {TextWidgetCmd procedure, "count" option} -setup {
    text .t
    pack .t
    update







|
>
>
|





|
|



|
<

|







2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668

2669
2670
2671
2672
2673
2674
2675
2676
2677
    .t configure -wrap none
    set res [.t count -displaylines 2.0 3.0]
} -cleanup {
    destroy .t
} -result {0}
test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
    toplevel .mytop
    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
      .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.30 3.10

    lappend res [.mytop.t count -displaylines 2.0 3.0]
    lappend res [.mytop.t count -displaylines 2.0 3.50]
} -cleanup {
    destroy .mytop
} -result {1 3}
test text-9.2.47 {TextWidgetCmd procedure, "count" option} -setup {
    text .t
    pack .t
    update