aboutsummaryrefslogtreecommitdiff
path: root/t/02getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 't/02getkey.c')
-rw-r--r--t/02getkey.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/02getkey.c b/t/02getkey.c
index f2bd299..92779b4 100644
--- a/t/02getkey.c
+++ b/t/02getkey.c
@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
TermKey *tk;
TermKeyKey key;
- plan_tests(27);
+ plan_tests(31);
tk = termkey_new_abstract("vt100", 0);
@@ -61,6 +61,14 @@ int main(int argc, char *argv[])
is_int(termkey_get_buffer_remaining(tk), 256, "buffer free 256 after completion");
+ termkey_push_bytes(tk, "\033[27;5u", 7);
+
+ is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY after Ctrl-Escape");
+
+ is_int(key.type, TERMKEY_TYPE_KEYSYM, "key.type after Ctrl-Escape");
+ is_int(key.code.sym, TERMKEY_SYM_ESCAPE, "key.code.sym after Ctrl-Escape");
+ is_int(key.modifiers, TERMKEY_KEYMOD_CTRL, "key.modifiers after Ctrl-Escape");
+
termkey_destroy(tk);
return exit_status();