From f077a2e77a95c7c3226db1728b0e432dfb4ad9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 11 Dec 2021 20:44:01 +0100 Subject: [PATCH] test: config: verify collisions with the mouse override modifiers are detected --- tests/test-config.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test-config.c b/tests/test-config.c index 94e211f0..1e99b3c4 100644 --- a/tests/test-config.c +++ b/tests/test-config.c @@ -380,7 +380,8 @@ test_key_binding(struct context *ctx, bool (*parse_fun)(struct context *ctx), enum collision_test_mode { FAIL_DIFFERENT_ACTION, FAIL_DIFFERENT_ARGV, - SUCCED_SAME_ACTION_AND_ARGV + FAIL_MOUSE_OVERRIDE, + SUCCED_SAME_ACTION_AND_ARGV, }; static void @@ -429,6 +430,10 @@ _test_binding_collisions(struct context *ctx, case FAIL_DIFFERENT_ACTION: break; + case FAIL_MOUSE_OVERRIDE: + ctx->conf->mouse.selection_override_modifiers.ctrl = true; + break; + case FAIL_DIFFERENT_ARGV: case SUCCED_SAME_ACTION_AND_ARGV: bindings.arr[0].pipe.master_copy = true; @@ -484,6 +489,11 @@ test_binding_collisions(struct context *ctx, _test_binding_collisions(ctx, max_action, map, type, FAIL_DIFFERENT_ACTION); _test_binding_collisions(ctx, max_action, map, type, FAIL_DIFFERENT_ARGV); _test_binding_collisions(ctx, max_action, map, type, SUCCED_SAME_ACTION_AND_ARGV); + + if (type == MOUSE_BINDING) { + _test_binding_collisions( + ctx, max_action, map, type, FAIL_MOUSE_OVERRIDE); + } } static void