Tk Source Code

Check-in [13b9b5bd]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Added more tests, and fixed test result of text-27.26 since now indices are relative to the text widget state at undo/redo return time, and also because they are optimized (no overlaps)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-449
Files: files | file ages | folders
SHA1: 13b9b5bd8fdb1418435f751c71e5466c3e8d7913
User & Date: fvogel 2016-07-05 20:07:01
Original Comment: Added more tests, and fixed test result of text-27.26 since now indices are relative to the text widget state at undo/redo return time, and also because their are optimized (no overlaps)
Context
2016-07-05
20:36
Fixed copy/paste error in test text-27.28 - one wants to test undo and redo, not twice undo check-in: 2fad88cb user: fvogel tags: tip-449
20:07
Added more tests, and fixed test result of text-27.26 since now indices are relative to the text widget state at undo/redo return time, and also because they are optimized (no overlaps) check-in: 13b9b5bd user: fvogel tags: tip-449
20:03
Removed unintended whitespace change check-in: 33ccff8f user: fvogel tags: tip-449
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/text.test.

6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609






























6610
6611
6612
6613
6614
6615
6616
    lappend res [.t edit redo]
    .t replace 1.6 1.10 Tcl/Tk
    .t replace 2.8 2.12 "one bites the dust"
    lappend res [.t edit undo]
    lappend res [.t edit redo]
} -cleanup {
    destroy .t
} -result [list {2.0 2.19 1.6 1.12 1.6 2.0} \
                {1.6 2.0 1.6 1.12 2.0 2.19} \
                {1.9 1.10 1.9 1.10 1.6 1.7} \
                {1.6 1.7 1.9 1.10 1.9 1.10} \
                {2.8 2.26 2.8 2.12 1.6 1.12 1.6 1.10} \
                {1.6 1.10 1.6 1.12 2.8 2.12 2.8 2.26} ]
































test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
    pack [text .t -wrap none]
    .t insert end [string repeat "\1" 500]
} -cleanup {
    destroy .t






|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
    lappend res [.t edit redo]
    .t replace 1.6 1.10 Tcl/Tk
    .t replace 2.8 2.12 "one bites the dust"
    lappend res [.t edit undo]
    lappend res [.t edit redo]
} -cleanup {
    destroy .t
} -result [list {1.6 2.0}           \
                {1.6 2.19}          \
                {1.6 1.7 1.10 1.12} \
                {1.6 1.7 1.9 1.11}  \
                {1.6 1.16 2.8 2.19} \
                {1.6 1.16 2.8 2.30} ]
test text-27.27 {edit undo and edit redo return ranges} -setup {
    destroy .t
    set res {}
} -body {
    text .t -undo true -autoseparators false
    for {set i 3} {$i >= 1} {incr i -1} {
        .t insert 1.0 "Line $i\n"
    }
    lappend res [.t edit undo]
    lappend res [.t edit redo]
} -cleanup {
    destroy .t
} -result [list {1.0 2.0} \
                {1.0 4.0} ]
test text-27.28 {edit undo and edit redo do not leave \
                 spurious temporary marks behind them} -setup {
    destroy .t
    set res {}
} -body {
    pack [text .t -undo true -autoseparators false]
    .t insert end "Hello World.\n"
    .t edit separator
    .t insert end "Again hello.\n"
    .t edit undo
    lappend res [lsearch [.t mark names] tk::undoMark*]
    .t edit undo
    lappend res [lsearch [.t mark names] tk::undoMark*]
} -cleanup {
    destroy .t
} -result [list -1 -1]


test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
    pack [text .t -wrap none]
    .t insert end [string repeat "\1" 500]
} -cleanup {
    destroy .t