From 0b6034171d1c461e9c7758e6ba29962052d89ad3 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 2 May 2020 16:58:33 +0000 Subject: Add (currently failing) tests bind-33.16, bind-33.17 and bind-33.18 exercising the case reported in bug [16ef161925] --- tests/bind.test | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/bind.test b/tests/bind.test index 7cb515d..8bd215a 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -6624,6 +6624,57 @@ test bind-33.15 {prefer last in case of homogeneous equal patterns} -setup { # because both bindings are homogeneous equal, so the most recently defined # must be preferred. } -result {last} +test bind-33.16 {simulate use of the keyboard to trigger a pattern sequence with modifier - bug [16ef161925]} -setup { + pack [frame .t.f] + focus -force .t.f + update + set x {} +} -body { + bind .t.f { lappend x "Esc_Control-c" } + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + set x +} -cleanup { + destroy .t.f +} -result {Esc_Control-c} +test bind-33.17 {simulate use of the keyboard to trigger a pattern sequence with modifier - bug [16ef161925]} -setup { + pack [frame .t.f] + focus -force .t.f + update + set x {} +} -body { + bind .t.f { lappend x "Esc_Control-c" } + bind .t.f { lappend x "Esc_Ctrl_L_Control-c" } + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + set x +} -cleanup { + destroy .t.f +} -result {Esc_Ctrl_L_Control-c} +test bind-33.18 {simulate use of the keyboard to trigger a pattern sequence with modifier - bug [16ef161925]} -setup { + pack [frame .t.f] + focus -force .t.f + update + set x {} +} -body { + bind .t.f { lappend x "Esc_Control-c" } + bind .t.f { lappend x "Esc_Ctrl_L_Control-c" } + bind .t.f { lappend x "Esc_Ctrl_L(2)_Control-c" } + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + event generate .t.f + set x +} -cleanup { + destroy .t.f +} -result {Esc_Ctrl_L(2)_Control-c} test bind-34.1 {-warp works relatively to a window} -setup { toplevel .top -- cgit v0.12