summaryrefslogtreecommitdiffstats
path: root/tests/ttk/checkbutton.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ttk/checkbutton.test')
-rw-r--r--tests/ttk/checkbutton.test18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index 8b8c9b7..248db96 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -2,7 +2,7 @@
# ttk::checkbutton widget tests.
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
@@ -57,7 +57,7 @@ test checkbutton-1.7 "Button destroyed by click" -body {
pack .top.mb
focus -force .top.mb
update
- event generate .top.mb <1>
+ event generate .top.mb <Button-1>
event generate .top.mb <ButtonRelease-1>
update ; # shall not trigger error invalid command name ".top.b"
} -result {}
@@ -71,4 +71,18 @@ test checkbutton-1.8 "Empty -variable" -body {
destroy .cbev
} -result {}
+test checkbutton-2.1 "style command" -body {
+ ttk::checkbutton .w
+ list [.w cget -style] [.w style] [winfo class .w]
+} -cleanup {
+ destroy .w
+} -result {{} TCheckbutton TCheckbutton}
+test checkbutton-2.2 "style command" -body {
+ ttk::style configure customStyle.TCheckbutton
+ ttk::checkbutton .w -style customStyle.TCheckbutton
+ list [.w cget -style] [.w style] [winfo class .w]
+} -cleanup {
+ destroy .w
+} -result {customStyle.TCheckbutton customStyle.TCheckbutton TCheckbutton}
+
tcltest::cleanupTests