summaryrefslogtreecommitdiffstats
path: root/tests/scale.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-11-07 14:22:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-11-07 14:22:05 (GMT)
commit29365745fb90efc1a5ee27040f1767ebb8e04175 (patch)
tree2b4547b0fdbf3c85aef0cfcb1be9c36279417c24 /tests/scale.test
parentd7203748fca734700dbf46f3119b79829aec6618 (diff)
parent8067434f8a2a55d874ed2ddb9cd2bfc6e20c3e01 (diff)
downloadtk-29365745fb90efc1a5ee27040f1767ebb8e04175.zip
tk-29365745fb90efc1a5ee27040f1767ebb8e04175.tar.gz
tk-29365745fb90efc1a5ee27040f1767ebb8e04175.tar.bz2
[3529885] [scale] handle negative resolution properly.
Diffstat (limited to 'tests/scale.test')
-rw-r--r--tests/scale.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/scale.test b/tests/scale.test
index 1e072a0..32ce1ff 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -1362,6 +1362,39 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup {
} -result {0 {}}
+test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \
+ -setup {
+ catch {destroy .s}
+ catch {destroy .s1 .s2 .s3 .s4}
+ scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100
+ scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100
+ scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100
+ scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100
+ pack .s1 .s2 .s3 .s4 -side left
+ update
+ } \
+ -body {
+ foreach {x y} [.s1 coord 50] {}
+ event generate .s1 <1> -x $x -y $y
+ event generate .s1 <ButtonRelease-1> -x $x -y $y
+ foreach {x y} [.s2 coord 50] {}
+ event generate .s2 <1> -x $x -y $y
+ event generate .s2 <ButtonRelease-1> -x $x -y $y
+ foreach {x y} [.s3 coord 50] {}
+ event generate .s3 <1> -x $x -y $y
+ event generate .s3 <ButtonRelease-1> -x $x -y $y
+ foreach {x y} [.s4 coord 50] {}
+ event generate .s4 <1> -x $x -y $y
+ event generate .s4 <ButtonRelease-1> -x $x -y $y
+ update
+ list $x1 $x2 $x3 $x4
+ } \
+ -cleanup {
+ unset x1 x2 x3 x4 x y
+ destroy .s1 .s2 .s3 .s4
+ } \
+ -result {1.0 1.0 1.0 1.0}
+
option clear
# cleanup