summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-09 21:30:11 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-09 21:30:11 (GMT)
commit91073e4b5a77eb86aadddb05d9666a89f9b81907 (patch)
treefab24e8432bdc70bf1eab2c7e9468941c938cc9d
parent8ffa9516ef4ea4b1d2bded2bc05999322889a15a (diff)
downloadtk-91073e4b5a77eb86aadddb05d9666a89f9b81907.zip
tk-91073e4b5a77eb86aadddb05d9666a89f9b81907.tar.gz
tk-91073e4b5a77eb86aadddb05d9666a89f9b81907.tar.bz2
-selectforeground tag configuration option: tests
-rw-r--r--tests/textTag.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/textTag.test b/tests/textTag.test
index a7935da..8b5ac74 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -239,6 +239,17 @@ test textTag-1.25b {configuration options} -body {
} -cleanup {
.t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3]
} -returnCodes error -result {unknown color name "non-existent"}
+test textTag-1.25c {tag configuration options} -body {
+ .t tag configure x -selectforeground #012345
+ .t tag cget x -selectforeground
+} -cleanup {
+ .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
+} -result {#012345}
+test textTag-1.25d {configuration options} -body {
+ .t tag configure x -selectforeground non-existent
+} -cleanup {
+ .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
+} -returnCodes error -result {unknown color name "non-existent"}
test textTag-1.26 {tag configuration options} -constraints {
haveCourier12
} -body {
@@ -747,6 +758,29 @@ test textTag-5.23 {TkTextTagCmd - "configure" option} -body {
lappend x [.t cget -selectbackground]
return $x
} -result {yellow blue red white}
+test textTag-5.24 {TkTextTagCmd - "configure" option} -body {
+ set x {}
+ # when [.t tag cget sel -selectforeground] == "", mirroring happens between
+ # the text widget option -selectforeground
+ # and the tag option -foreground
+ .t tag configure sel -selectforeground {}
+ .t configure -selectforeground black
+ .t tag configure sel -foreground yellow
+ lappend x [.t cget -selectforeground]
+ .t tag configure sel -foreground orange
+ .t configure -selectforeground blue
+ lappend x [.t tag cget sel -foreground]
+ # when [.t tag cget sel -selectforeground] != "", mirroring happens between
+ # the text widget option -selectforeground
+ # and the tag option -selectforeground
+ .t tag configure sel -selectforeground green
+ .t configure -selectforeground red
+ lappend x [.t tag cget sel -selectforeground]
+ .t configure -selectforeground black
+ .t tag configure sel -selectforeground white
+ lappend x [.t cget -selectforeground]
+ return $x
+} -result {yellow blue red white}
test textTag-6.1 {TkTextTagCmd - "delete" option} -constraints {
haveCourier12