mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
test: config: test mouse section
This commit is contained in:
parent
956f8995b9
commit
8b2e46b6dc
1 changed files with 18 additions and 0 deletions
|
|
@ -524,6 +524,23 @@ test_section_cursor(void)
|
|||
config_free(conf);
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue