From 01d26270f691e78680e6a684fa4bb9c7efc54c4c Mon Sep 17 00:00:00 2001 From: Piotr Kocia Date: Sat, 5 Apr 2025 14:37:34 +0200 Subject: [PATCH] fix incorrect counts in tests --- tests/test-config.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test-config.c b/tests/test-config.c index ff4278f9..7147f668 100644 --- a/tests/test-config.c +++ b/tests/test-config.c @@ -1199,13 +1199,13 @@ test_section_vimode_search_bindings(void) test_invalid_key(&ctx, &parse_section_vimode_search_bindings, "invalid-key"); - for (int action = 0; action < BIND_ACTION_VIMODE_COUNT; action++) { + for (int action = 0; action < BIND_ACTION_VIMODE_SEARCH_COUNT; action++) { if (vimode_search_binding_action_map[action] == NULL) continue; test_key_binding( &ctx, &parse_section_vimode_search_bindings, - action, BIND_ACTION_VIMODE_COUNT - 1, + action, BIND_ACTION_VIMODE_SEARCH_COUNT - 1, vimode_search_binding_action_map, &conf.bindings.vimode_search, KEY_BINDING, false, false); } @@ -1234,9 +1234,10 @@ test_section_vimode_search_bindings_collisions(void) struct context ctx = { .conf = &conf, .section = "vimode-search-bindings", .path = "unittest"}; - test_binding_collisions( - &ctx, - BIND_ACTION_VIMODE_COUNT - 1, vimode_search_binding_action_map, KEY_BINDING); + test_binding_collisions(&ctx, + BIND_ACTION_VIMODE_SEARCH_COUNT - 1, + vimode_search_binding_action_map, + KEY_BINDING); config_free(&conf); }