summaryrefslogtreecommitdiffstats
path: root/tests/scale.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 15:41:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 15:41:59 (GMT)
commit42e3af0d0ae489a65f7f3ce98429a394c0926c32 (patch)
tree0149222f25fa8bd0c3a1cb50b3e71a5419cf6021 /tests/scale.test
parent3fa224a2450a99a43c66f5f85951bcadb65430c2 (diff)
parent2fd9fcf08d73f688888ef8784be0c5493b80d818 (diff)
downloadtk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.zip
tk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.tar.gz
tk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.tar.bz2
merge trunktip_415
Diffstat (limited to 'tests/scale.test')
-rw-r--r--tests/scale.test39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/scale.test b/tests/scale.test
index 13ccb4d..a8d08a8 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -688,6 +688,11 @@ test scale-6.20 {ComputeFormat procedure} -body {
.s set 1001.23456789
.s get
} -result {1001.235}
+test scale-6.21 {ComputeFormat procedure} -body {
+ .s configure -length 200 -from 1000 -to 1001.8 -resolution 0 -digits 200
+ .s set 1001.23456789
+ .s get
+} -result {1001.235}
destroy .s
@@ -1357,6 +1362,40 @@ 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}
+ unset -nocomplain x1 x2 x3 x4 x y
+ 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