summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-03-07 21:10:15 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-03-07 21:10:15 (GMT)
commit0e4e2778068da247b591c03d482b78e9d22bd0a8 (patch)
tree0f2ce54afe09556f41daee9acbdbfbc0a5f66a25 /tests
parente97e9aead9bd1631f75f3778e3163251078de44e (diff)
parente353dfd7b77de377b5475b760d286a0990958dd6 (diff)
downloadtk-0e4e2778068da247b591c03d482b78e9d22bd0a8.zip
tk-0e4e2778068da247b591c03d482b78e9d22bd0a8.tar.gz
tk-0e4e2778068da247b591c03d482b78e9d22bd0a8.tar.bz2
Fixed bug [841280] - spinbox -from and -to defaults and behaviour
Diffstat (limited to 'tests')
-rw-r--r--tests/spinbox.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 594cc90..0264b77 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -2072,6 +2072,21 @@ test spinbox-5.11 {ConfigureSpinbox procedure} -setup {
} -cleanup {
destroy .e
} -result {}
+test spinbox-5.12 {ConfigureSpinbox procedure, -from and -to swapping} -setup {
+ spinbox .e
+} -body {
+ # this statement used to trigger error "-to value must be greater than -from value"
+ # because default value for -to is zero (bug [841280ffff])
+ set res [catch {.e configure -from 10}]
+ .e configure -from 1971 -to 2016 ; # standard case
+ lappend res [.e cget -from] [.e cget -to]
+ .e configure -from 2016 -to 1971 ; # auto-swapping happens
+ lappend res [.e cget -from] [.e cget -to]
+ .e configure -to 1971 -from 2016 ; # auto-swapping, order of options does not matter
+ lappend res [.e cget -from] [.e cget -to]
+} -cleanup {
+ destroy .e
+} -result {0 1971.0 2016.0 1971.0 2016.0 1971.0 2016.0}
# No tests for DisplaySpinbox.