Tk Source Code

Check-in [e4f27e1d]
Login

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

Overview
Comment:Added test for bug 1615425
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-1630262
Files: files | file ages | folders
SHA1: e4f27e1d4d0803f561779808a46bb2d8eac74dc9
User & Date: fvogel 2012-02-03 21:04:01
Context
2012-02-03
21:45
Updated changelog to take bug-1615425 into account check-in: c2631a86 user: fvogel tags: bug-1630262
21:04
Added test for bug 1615425 check-in: e4f27e1d user: fvogel tags: bug-1630262
2012-02-02
10:40
Better fix for bug-1630262, also fixing bug-1615425 check-in: 1cb7c1e0 user: fvogel tags: bug-1630262
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/textTag.test.

143
144
145
146
147
148
149













150
151
152
153
154
155
156
    .t tag ranges sel
} {1.1 1.5 2.4 3.1 4.2 4.4}
test textTag-2.13 {TkTextTagCmd - "add" option} haveCourier12 {
    .t tag remove sel 1.0 end
    .t tag add sel 1.1 1.5 2.4
    .t tag ranges sel
} {1.1 1.5 2.4 2.5}














catch {.t tag delete x}
test textTag-3.1 {TkTextTagCmd - "bind" option} haveCourier12 {
    list [catch {.t tag bind} msg] $msg
} {1 {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}}
test textTag-3.2 {TkTextTagCmd - "bind" option} haveCourier12 {
    list [catch {.t tag bind 1 2 3 4} msg] $msg







>
>
>
>
>
>
>
>
>
>
>
>
>







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
    .t tag ranges sel
} {1.1 1.5 2.4 3.1 4.2 4.4}
test textTag-2.13 {TkTextTagCmd - "add" option} haveCourier12 {
    .t tag remove sel 1.0 end
    .t tag add sel 1.1 1.5 2.4
    .t tag ranges sel
} {1.1 1.5 2.4 2.5}
test textTag-2.14 {tag add before -startline - Bug 1615425} haveCourier12 {
    text .tt
    for {set i 1} {$i <10} {incr i} {
        .tt insert end "Line $i\n"
    }
    .tt tag configure mytag -font {Courier 12 bold}
    .tt peer create .ptt
    .ptt configure -startline 3 -endline 7
    # the test succeeds if next line does not crash
    .tt tag add mytag 1.0 1.end
    destroy .ptt .tt
    set res 1
} {1}

catch {.t tag delete x}
test textTag-3.1 {TkTextTagCmd - "bind" option} haveCourier12 {
    list [catch {.t tag bind} msg] $msg
} {1 {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}}
test textTag-3.2 {TkTextTagCmd - "bind" option} haveCourier12 {
    list [catch {.t tag bind 1 2 3 4} msg] $msg