mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
test: config: test ‘scrollback’ section
This commit is contained in:
parent
cd9b936003
commit
2fa29fb5f4
1 changed files with 20 additions and 0 deletions
|
|
@ -397,6 +397,25 @@ test_section_bell(void)
|
|||
config_free(conf);
|
||||
}
|
||||
|
||||
static void
|
||||
test_section_scrollback(void)
|
||||
{
|
||||
struct config conf = {0};
|
||||
struct context ctx = {
|
||||
.conf = &conf, .section = "scrollback", .path = "unittest"};
|
||||
|
||||
test_invalid_key(&ctx, &parse_section_scrollback, "invalid-key");
|
||||
|
||||
test_uint32(&ctx, &parse_section_scrollback, "lines",
|
||||
&conf.scrollback.lines);
|
||||
test_double(&ctx, parse_section_scrollback, "multiplier", &conf.scrollback.multiplier);
|
||||
|
||||
/* TODO: indicator-position (enum) */
|
||||
/* TODO: indicator-format (enum, sort-of) */
|
||||
|
||||
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,
|
||||
|
|
@ -822,6 +841,7 @@ main(int argc, const char *const *argv)
|
|||
log_init(LOG_COLORIZE_AUTO, false, 0, LOG_CLASS_ERROR);
|
||||
test_section_main();
|
||||
test_section_bell();
|
||||
test_section_scrollback();
|
||||
test_section_key_bindings();
|
||||
test_section_key_bindings_collisions();
|
||||
test_section_search_bindings();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue