diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-12-29 18:18:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-12-29 18:18:41 +0000 |
| commit | 8b2e46b6dc3e73663842549667f11928d083d23d (patch) | |
| tree | 77adf310927a72c1989e2264440a9c7df4e21c5c | |
| parent | test: config: test cursor section (diff) | |
test: config: test mouse section
| -rw-r--r-- | tests/test-config.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test-config.c b/tests/test-config.c index e97cbcb8..f9f722ab 100644 --- a/tests/test-config.c +++ b/tests/test-config.c @@ -525,6 +525,23 @@ test_section_cursor(void) } static void +test_section_mouse(void) +{ + struct config conf = {0}; + struct context ctx = { + .conf = &conf, .section = "mouse", .path = "unittest"}; + + test_invalid_key(&ctx, &parse_section_mouse, "invalid-key"); + + test_boolean(&ctx, &parse_section_mouse, "hide-when-typing", + &conf.mouse.hide_when_typing); + test_boolean(&ctx, &parse_section_mouse, "alternate-scroll-mode", + &conf.mouse.alternate_scroll_mode); + + config_free(conf); +} + +static void test_key_binding(struct context *ctx, bool (*parse_fun)(struct context *ctx), int action, int max_action, const char *const *map, struct config_key_binding_list *bindings, @@ -952,6 +969,7 @@ main(int argc, const char *const *argv) test_section_scrollback(); test_section_url(); test_section_cursor(); + test_section_mouse(); test_section_key_bindings(); test_section_key_bindings_collisions(); test_section_search_bindings(); |
