From 737d44808eb279213954f4b5d4417f9bea3bd6a6 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 25 Mar 2018 15:59:29 +0000 Subject: Add test listbox-32 to check for support of high resolution 'mouse wheels', actually for 2 fingers touch scroll on some devices. Thanks to dnikolajevich for providing the test. --- tests/listbox.test | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/listbox.test b/tests/listbox.test index 99c84a7..0ce3fc6 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -3177,6 +3177,36 @@ test listbox-31.2 {<> event on lost selection} -setup { destroy .l } -result {{.l 0} {{} {}}} +test listbox-32 { event win32} -constraints { + win +} -setup { + destroy .l + listbox .l -width 10 -height 5 + pack .l + update +} -body { + set log {} + .l insert 0 a b c d e f g h i j k l m n o p q r s t + .l yview 8 + update + record yv {*}[.l yview] + for {set i 0} {$i < 20} {incr i} { event generate .l -delta 6 } + update + record yv {*}[.l yview] + for {set i 0} {$i < 20} {incr i} { event generate .l -delta 6 } + update + record yv {*}[.l yview] + for {set i 0} {$i < 20} {incr i} { event generate .l -delta -6 } + update + record yv {*}[.l yview] + for {set i 0} {$i < 20} {incr i} { event generate .l -delta -6 } + update + record yv {*}[.l yview] + set log +} -cleanup { + destroy .l +} -result {{yv 0.4 0.65} {yv 0.2 0.45} {yv 0 0.25} {yv 0.2 0.45} {yv 0.4 0.65}} + resetGridInfo deleteWindows option clear -- cgit v0.12