summaryrefslogtreecommitdiffstats
path: root/tests/ttk/ttk.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ttk/ttk.test')
-rw-r--r--tests/ttk/ttk.test28
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index 5a982b6..def709e 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -6,6 +6,14 @@ loadTestedCommands
proc skip args {}
proc ok {} { return }
+variable widgetClasses {
+ button checkbutton radiobutton menubutton label entry
+ frame labelframe scrollbar
+ notebook progressbar combobox separator
+ panedwindow treeview sizegrip
+ scale
+}
+
proc bgerror {error} {
variable bgerror $error
variable bgerrorInfo $::errorInfo
@@ -62,10 +70,7 @@ test ttk-6.6 "Bad color spec in styles" -body {
} -result {unknown color name "badColor"}
test ttk-6.7 "Basic destruction test" -body {
- foreach widget {
- button checkbutton radiobutton sizegrip separator notebook
- progressbar panedwindow scrollbar
- } {
+ foreach widget $widgetClasses {
ttk::$widget .w
pack .w
destroy .w
@@ -214,6 +219,21 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
unset -nocomplain ttk28 aid
} -result 1
+foreach wc $widgetClasses {
+ test ttk-coreoptions-$wc "$wc has all core options" -body {
+ ttk::$wc .w
+ foreach option {
+ -class
+ -style
+ -cursor
+ -takefocus
+ } {
+ .w cget $option
+ }
+ destroy .w
+ }
+}
+
# misc. error detection
test ttk-3.0 "Bad option" -body {
ttk::button .bad -badoption foo