diff options
author | fvogel <fvogelnew1@free.fr> | 2016-03-07 21:10:15 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-03-07 21:10:15 (GMT) |
commit | 6303ff70a7894f35c17aac5206f31e96a247b881 (patch) | |
tree | 0f2ce54afe09556f41daee9acbdbfbc0a5f66a25 /tests | |
parent | 16f5310ecb377c40d1a2d7a195b63b440c140d43 (diff) | |
parent | 22a09fa099a33900fca7c81d9ac4880b3d861b80 (diff) | |
download | tk-6303ff70a7894f35c17aac5206f31e96a247b881.zip tk-6303ff70a7894f35c17aac5206f31e96a247b881.tar.gz tk-6303ff70a7894f35c17aac5206f31e96a247b881.tar.bz2 |
Fixed bug [841280] - spinbox -from and -to defaults and behaviour
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spinbox.test | 15 |
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. |