diff options
author | fvogel <fvogelnew1@free.fr> | 2016-02-24 17:19:36 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-02-24 17:19:36 (GMT) |
commit | db0f75aaee952d79eac60d9f4e4179441c040d55 (patch) | |
tree | 2745110c7d5f79cbca496fd26b1878662179df64 /tests | |
parent | 3dfd0dd611bcd8d85edae8c326be10eb2ee5518a (diff) | |
download | tk-db0f75aaee952d79eac60d9f4e4179441c040d55.zip tk-db0f75aaee952d79eac60d9f4e4179441c040d55.tar.gz tk-db0f75aaee952d79eac60d9f4e4179441c040d55.tar.bz2 |
Added tests cases for bug [2262543] - Scale widget unexpectedly fires command callback
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scale.test | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/tests/scale.test b/tests/scale.test index a8d08a8..8c14ed4 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -1396,6 +1396,114 @@ test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \ } \ -result {1.0 1.0 1.0 1.0} +test scale-20.1 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 1} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 -command {set commandedVar} + pack .s + update ; # -command callback shall NOT fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {1 -1} +test scale-20.2 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 2} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 + set scaleVar 7 +} -body { + scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar} + pack .s + update ; # -command callback shall NOT fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {7 -1} +test scale-20.3 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 3} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 + .s set 10 + .s configure -command {set commandedVar} + pack .s + update ; # -command callback shall NOT fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 -1} +test scale-20.4 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 4} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 -command {set commandedVar} + .s set 10 + pack .s + update ; # -command callback shall fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 10} +test scale-20.5 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 5} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 + pack .s + .s set 10 + .s configure -command {set commandedVar} + update ; # -command callback shall NOT fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 -1} +test scale-20.6 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 6} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 + pack .s + .s configure -command {set commandedVar} + .s set 10 + update ; # -command callback shall fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 10} +test scale-20.7 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 7} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 +} -body { + scale .s -from 1 -to 50 -command {set commandedVar} + pack .s + .s set 10 + update ; # -command callback shall fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 10} +test scale-20.8 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 8} -setup { + catch {destroy .s} + set res {} + set commandedVar -1 + set scaleVar 7 +} -body { + scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar} + pack .s + .s set 10 + update ; # -command callback shall fire + set res [list [.s get] $commandedVar] +} -cleanup { + destroy .s +} -result {10 10} + option clear # cleanup |