summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-06-21 15:54:03 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-06-21 15:54:03 (GMT)
commit96ed56d2bae8f2f7f1f86a1ff4a9a23c1fc3447c (patch)
tree3b9ddea7c9085dcd3badb748c9bd93bf52db9db0 /tests
parent08125543bb6f0e52cf39ebecfd21cf8371b7ab0f (diff)
downloadtk-96ed56d2bae8f2f7f1f86a1ff4a9a23c1fc3447c.zip
tk-96ed56d2bae8f2f7f1f86a1ff4a9a23c1fc3447c.tar.gz
tk-96ed56d2bae8f2f7f1f86a1ff4a9a23c1fc3447c.tar.bz2
Add two new tests, bind-33.20 and bind-33.21, exercising bindings to mixed types (Key and Button) events as sent by the keyboard (including the KeyRelease event) and mouse. These tests currently fail with TIP #532 implementation but pass with the old implementation with the event ring.
Diffstat (limited to 'tests')
-rw-r--r--tests/bind.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bind.test b/tests/bind.test
index 7431079..6ad36f1 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -6691,6 +6691,37 @@ test bind-33.19 {simulate use of the keyboard to trigger a pattern sequence with
} -cleanup {
destroy .t.f
} -result {Esc_Key(2)_Control-c}
+test bind-33.20 {simulate use of the keyboard to trigger a pattern sequence with mixed Key and Button types - bug [16ef161925]} -setup {
+ pack [frame .t.f]
+ focus -force .t.f
+ update
+ set x {}
+} -body {
+ bind .t.f <Key-1><Button-1> { lappend x "1_Button1" }
+ event generate .t.f <Key-1>
+ event generate .t.f <KeyRelease-1>
+ event generate .t.f <Button-1>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {1_Button1}
+test bind-33.21 {simulate use of the keyboard to trigger a pattern sequence with mixed Key and Button types - bug [16ef161925]} -setup {
+ pack [frame .t.f]
+ focus -force .t.f
+ update
+ set x {}
+} -body {
+ bind .t.f <Key-1><Button-1> { lappend x "1_Button1" }
+ bind .t.f <Key-1><Button-1><Key-2> { lappend x "1_Button1_2" }
+ event generate .t.f <Key-1>
+ event generate .t.f <KeyRelease-1>
+ event generate .t.f <Button-1>
+ event generate .t.f <Key-2>
+ event generate .t.f <KeyRelease-2>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {1_Button1 1_Button1_2}
test bind-34.1 {-warp works relatively to a window} -setup {
toplevel .top