aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-05-25 17:38:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-26 07:13:58 +0000
commit3d9302b6f95e3bb0f00695faf8c575440c685840 (patch)
tree19dc7a6cd1919b14234c5d1db7f66113a4786959 /input.c
parentinput: regression test for escape sequence generated for ctrl+shift+tab (diff)
macros: add UNITTEST macro and use to replace test_keymap_lookup()
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/input.c b/input.c
index 7c1004f9..96c41a15 100644
--- a/input.c
+++ b/input.c
@@ -884,9 +884,7 @@ keymap_lookup(struct terminal *term, xkb_keysym_t sym, enum modifier mods)
return NULL;
}
-#if defined(_DEBUG)
-static void __attribute__((constructor))
-test_keymap_lookup(void)
+UNITTEST
{
struct terminal term = {
.num_lock_modifier = false,
@@ -897,7 +895,6 @@ test_keymap_lookup(void)
const struct key_data *info = keymap_lookup(&term, XKB_KEY_ISO_Left_Tab, MOD_SHIFT | MOD_CTRL);
xassert(strcmp(info->seq, "\033[27;6;9~") == 0);
}
-#endif
static void
key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,