From 6acf033f061f09ca43c0203318847b950110eb87 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 10 Feb 2016 22:54:09 +0000 Subject: -rmargincolor tag configuration option: tests --- tests/textTag.test | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/tests/textTag.test b/tests/textTag.test index 9e0cf38..f8d7033 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -251,45 +251,56 @@ test textTag-1.25 {configuration options} -constraints { .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 -rmargincolor darkblue + .t tag cget x -rmargincolor +} -cleanup { + .t tag configure x -rmargincolor [lindex [.t tag configure x -rmargincolor] 3] +} -result {darkblue} +test textTag-1.25b {configuration options} -body { + .t tag configure x -rmargincolor non-existent +} -cleanup { + .t tag configure x -rmargincolor [lindex [.t tag configure x -rmargincolor] 3] +} -returnCodes error -result {unknown color name "non-existent"} +test textTag-1.25c {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 { +test textTag-1.25d {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.25c {tag configuration options} -body { +test textTag-1.25e {tag configuration options} -body { .t tag configure x -selectbgstipple gray50 .t tag cget x -selectbgstipple } -cleanup { .t tag configure x -selectbgstipple [lindex [.t tag configure x -selectbgstipple] 3] } -result {gray50} -test textTag-1.25d {configuration options} -body { +test textTag-1.25f {configuration options} -body { .t tag configure x -selectbgstipple badStipple } -cleanup { .t tag configure x -selectbgstipple [lindex [.t tag configure x -selectbgstipple] 3] } -returnCodes error -result {bitmap "badStipple" not defined} -test textTag-1.25e {tag configuration options} -body { +test textTag-1.25g {tag configuration options} -body { .t tag configure x -selectfgstipple gray50 .t tag cget x -selectfgstipple } -cleanup { .t tag configure x -selectfgstipple [lindex [.t tag configure x -selectfgstipple] 3] } -result {gray50} -test textTag-1.25f {configuration options} -body { +test textTag-1.25h {configuration options} -body { .t tag configure x -selectfgstipple badStipple } -cleanup { .t tag configure x -selectfgstipple [lindex [.t tag configure x -selectfgstipple] 3] } -returnCodes error -result {bitmap "badStipple" not defined} -test textTag-1.25g {tag configuration options} -body { +test textTag-1.25i {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.25h {configuration options} -body { +test textTag-1.25j {configuration options} -body { .t tag configure x -selectforeground non-existent } -cleanup { .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3] @@ -719,12 +730,16 @@ test textTag-5.12 {TkTextTagCmd - "configure" option} -constraints { test textTag-5.13 {TkTextTagCmd - "configure" option} -body { .t tag delete x .t tag configure x -lmargin1 2 -lmargin2 4 -rmargin 5 \ - -lmargincolor darkblue + -lmargincolor darkblue -rmargincolor lightgreen list [.t tag configure x -lmargin1] [.t tag configure x -lmargin2] \ - [.t tag configure x -rmargin] [.t tag configure x -lmargincolor] + [.t tag configure x -rmargin] [.t tag configure x -lmargincolor] \ + [.t tag configure x -rmargincolor] } -cleanup { .t tag delete x -} -result {{-lmargin1 {} {} {} 2} {-lmargin2 {} {} {} 4} {-rmargin {} {} {} 5} {-lmargincolor {} {} {} darkblue}} +} -result [list {-lmargin1 {} {} {} 2} {-lmargin2 {} {} {} 4} \ + {-rmargin {} {} {} 5} \ + {-lmargincolor {} {} {} darkblue} {-rmargincolor {} {} {} lightgreen} \ + ] test textTag-5.14 {TkTextTagCmd - "configure" option} -constraints { haveCourier12 } -body { @@ -755,6 +770,12 @@ test textTag-5.16 {TkTextTagCmd - "configure" option} -constraints { } -cleanup { .t tag delete x } -returnCodes error -result {bad screen distance "140.1.1"} +test textTag-5.16a {TkTextTagCmd - "configure" option} -body { + .t tag delete x + .t tag configure x -rmargincolor rainbow +} -cleanup { + .t tag delete x +} -returnCodes error -result {unknown color name "rainbow"} .t tag delete x test textTag-5.17 {TkTextTagCmd - "configure" option} -constraints { haveCourier12 -- cgit v0.12