summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-25 14:40:12 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-25 14:40:12 (GMT)
commite353dfd7b77de377b5475b760d286a0990958dd6 (patch)
tree039efe1806ca6290bb2cc672030b093b35f9edad /tests
parent612675a4f57c40b222eccf363977705fbdd848aa (diff)
downloadtk-e353dfd7b77de377b5475b760d286a0990958dd6.zip
tk-e353dfd7b77de377b5475b760d286a0990958dd6.tar.gz
tk-e353dfd7b77de377b5475b760d286a0990958dd6.tar.bz2
Fixed bug [841280] - spinbox -from and -to defaults and behaviourbug_841280ffff
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.