Tk Source Code

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

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

Overview
Comment:-selectbackground tag configuration option: tests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-443
Files: files | file ages | folders
SHA1:eb082ed51dab6057656bf4f77e93d7fdffc554fe
User & Date: fvogel 2016-02-09 21:27:11
Context
2016-02-09
21:29
-selectforeground tag configuration option: implementation check-in: 6f8935b9 user: fvogel tags: tip-443
21:27
-selectbackground tag configuration option: tests check-in: eb082ed5 user: fvogel tags: tip-443
21:24
-selectbackground tag configuration option: documentation check-in: f78ca61c user: fvogel tags: tip-443
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/textTag.test.

224
225
226
227
228
229
230











231
232
233
234
235
236
237
...
709
710
711
712
713
714
715
716























717
718
719
720
721
722
723
test textTag-1.25 {configuration options} -constraints {
    haveCourier12
} -body {
    .t tag configure x -rmargin bad
} -cleanup {
    .t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
} -returnCodes error -result {bad screen distance "bad"}











test textTag-1.26 {tag configuration options} -constraints {
    haveCourier12
} -body {
    .t tag configure x -spacing1 10
    .t tag cget x -spacing1
} -cleanup {
    .t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
................................................................................
test textTag-5.22 {TkTextTagCmd - "configure" option} -constraints {
    haveCourier12 
} -body {
    .t configure -selectborderwidth 20
    .t tag configure sel -borderwidth {}
    .t cget -selectborderwidth
} -result {}

























test textTag-6.1 {TkTextTagCmd - "delete" option} -constraints {
    haveCourier12 
} -body {
    .t tag delete
} -returnCodes error -result {wrong # args: should be ".t tag delete tagName ?tagName ...?"}
test textTag-6.2 {TkTextTagCmd - "delete" option} -constraints {







>
>
>
>
>
>
>
>
>
>
>







 







<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
720
721
722
723
724
725
726

727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
test textTag-1.25 {configuration options} -constraints {
    haveCourier12
} -body {
    .t tag configure x -rmargin bad
} -cleanup {
    .t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.25a {tag configuration options} -body {
    .t tag configure x -selectbackground #012345
    .t tag cget x -selectbackground
} -cleanup {
    .t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3]
} -result {#012345}
test textTag-1.25b {configuration options} -body {
    .t tag configure x -selectbackground non-existent
} -cleanup {
    .t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3]
} -returnCodes error -result {unknown color name "non-existent"}
test textTag-1.26 {tag configuration options} -constraints {
    haveCourier12
} -body {
    .t tag configure x -spacing1 10
    .t tag cget x -spacing1
} -cleanup {
    .t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
................................................................................
test textTag-5.22 {TkTextTagCmd - "configure" option} -constraints {
    haveCourier12 
} -body {
    .t configure -selectborderwidth 20
    .t tag configure sel -borderwidth {}
    .t cget -selectborderwidth
} -result {}

test textTag-5.23 {TkTextTagCmd - "configure" option} -body {
    set x {}
    # when [.t tag cget sel -selectbackground] == "", mirroring happens between
    #     the text widget option -selectbackground
    # and the tag         option -background
    .t tag configure sel -selectbackground {}
    .t configure -selectbackground black
    .t tag configure sel -background yellow
    lappend x [.t cget -selectbackground]
    .t tag configure sel -background orange
    .t configure -selectbackground blue
    lappend x [.t tag cget sel -background]
    # when [.t tag cget sel -selectbackground] != "", mirroring happens between
    #     the text widget option -selectbackground
    # and the tag         option -selectbackground
    .t tag configure sel -selectbackground green
    .t configure -selectbackground red
    lappend x [.t tag cget sel -selectbackground]
    .t configure -selectbackground black
    .t tag configure sel -selectbackground white
    lappend x [.t cget -selectbackground]
    return $x
} -result {yellow blue red white}

test textTag-6.1 {TkTextTagCmd - "delete" option} -constraints {
    haveCourier12 
} -body {
    .t tag delete
} -returnCodes error -result {wrong # args: should be ".t tag delete tagName ?tagName ...?"}
test textTag-6.2 {TkTextTagCmd - "delete" option} -constraints {