diff options
author | fvogel <fvogelnew1@free.fr> | 2016-02-09 21:27:11 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-02-09 21:27:11 (GMT) |
commit | f47ea89bb9b84548e135f0a72a033b20f0fe9f2a (patch) | |
tree | a9213e1f41853f4af153059ad837fc86897813dc | |
parent | b3b68ebfe18ad11c210bc80ec440c49d7b6dad8d (diff) | |
download | tk-f47ea89bb9b84548e135f0a72a033b20f0fe9f2a.zip tk-f47ea89bb9b84548e135f0a72a033b20f0fe9f2a.tar.gz tk-f47ea89bb9b84548e135f0a72a033b20f0fe9f2a.tar.bz2 |
-selectbackground tag configuration option: tests
-rw-r--r-- | tests/textTag.test | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/textTag.test b/tests/textTag.test index fed073a..a7935da 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -228,6 +228,17 @@ test textTag-1.25 {configuration options} -constraints { } -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 { @@ -713,7 +724,29 @@ test textTag-5.22 {TkTextTagCmd - "configure" option} -constraints { .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 |