summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-12-31 15:34:30 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-12-31 15:34:30 (GMT)
commitcda2ded54e859b0f9d79d26db942f33b1f587a86 (patch)
tree76440096803959d899e5788fb360c203f1199e94 /tests/ttk
parent9ab39cd0776bddc7432f8bbb674c82698b330f43 (diff)
downloadtk-cda2ded54e859b0f9d79d26db942f33b1f587a86.zip
tk-cda2ded54e859b0f9d79d26db942f33b1f587a86.tar.gz
tk-cda2ded54e859b0f9d79d26db942f33b1f587a86.tar.bz2
Add test scale-2.1 to check support of the -state option by ttk::scale
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/scrollbar.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index 0464273..341b5c1 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -65,5 +65,28 @@ test scale-1.0 "Self-destruction" -body {
.s set 1 ; update
} -returnCodes 1 -match glob -result "*"
+test scale-2.1 "-state option" -setup {
+ ttk::scale .s
+ set res ""
+} -body {
+ # defaults
+ lappend res [.s instate disabled] [.s cget -state]
+ # set -state: instate returns accordingly
+ .s configure -state disabled
+ lappend res [.s instate disabled] [.s cget -state]
+ # back to normal
+ .s configure -state normal
+ lappend res [.s instate disabled] [.s cget -state]
+ # use state command: -state does NOT reflect it
+ .s state disabled
+ lappend res [.s instate disabled] [.s cget -state]
+ # further use state command
+ .s state readonly
+ lappend res [.s state] [.s cget -state]
+} -cleanup {
+ destroy .s
+ unset -nocomplain res
+} -result {0 normal 1 disabled 0 normal 1 normal {disabled readonly} normal}
+
tcltest::cleanupTests