aboutsummaryrefslogtreecommitdiff
path: root/tests/10keyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/10keyname.c')
-rw-r--r--tests/10keyname.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/10keyname.c b/tests/10keyname.c
index 20ac000..e37075f 100644
--- a/tests/10keyname.c
+++ b/tests/10keyname.c
@@ -1,40 +1,40 @@
-#include "../termkey.h"
+#include "../termo.h"
#include "taplib.h"
int
main (int argc, char *argv[])
{
- termkey_t *tk;
- termkey_sym_t sym;
+ termo_t *tk;
+ termo_sym_t sym;
const char *end;
plan_tests (10);
- tk = termkey_new_abstract ("vt100", NULL, 0);
+ tk = termo_new_abstract ("vt100", NULL, 0);
- sym = termkey_keyname2sym (tk, "Space");
- is_int (sym, TERMKEY_SYM_SPACE, "keyname2sym Space");
+ sym = termo_keyname2sym (tk, "Space");
+ is_int (sym, TERMO_SYM_SPACE, "keyname2sym Space");
- sym = termkey_keyname2sym (tk, "SomeUnknownKey");
- is_int (sym, TERMKEY_SYM_UNKNOWN, "keyname2sym SomeUnknownKey");
+ sym = termo_keyname2sym (tk, "SomeUnknownKey");
+ is_int (sym, TERMO_SYM_UNKNOWN, "keyname2sym SomeUnknownKey");
- end = termkey_lookup_keyname (tk, "Up", &sym);
- ok (!!end, "termkey_get_keyname Up returns non-NULL");
- is_str (end, "", "termkey_get_keyname Up return points at endofstring");
- is_int (sym, TERMKEY_SYM_UP, "termkey_get_keyname Up yields Up symbol");
+ end = termo_lookup_keyname (tk, "Up", &sym);
+ ok (!!end, "termo_get_keyname Up returns non-NULL");
+ is_str (end, "", "termo_get_keyname Up return points at endofstring");
+ is_int (sym, TERMO_SYM_UP, "termo_get_keyname Up yields Up symbol");
- end = termkey_lookup_keyname (tk, "DownMore", &sym);
- ok (!!end, "termkey_get_keyname DownMore returns non-NULL");
- is_str (end, "More", "termkey_get_keyname DownMore return points at More");
- is_int (sym, TERMKEY_SYM_DOWN,
- "termkey_get_keyname DownMore yields Down symbol");
+ end = termo_lookup_keyname (tk, "DownMore", &sym);
+ ok (!!end, "termo_get_keyname DownMore returns non-NULL");
+ is_str (end, "More", "termo_get_keyname DownMore return points at More");
+ is_int (sym, TERMO_SYM_DOWN,
+ "termo_get_keyname DownMore yields Down symbol");
- end = termkey_lookup_keyname (tk, "SomeUnknownKey", &sym);
- ok (!end, "termkey_get_keyname SomeUnknownKey returns NULL");
+ end = termo_lookup_keyname (tk, "SomeUnknownKey", &sym);
+ ok (!end, "termo_get_keyname SomeUnknownKey returns NULL");
- is_str (termkey_get_keyname (tk, TERMKEY_SYM_SPACE), "Space",
+ is_str (termo_get_keyname (tk, TERMO_SYM_SPACE), "Space",
"get_keyname SPACE");
- termkey_destroy (tk);
+ termo_destroy (tk);
return exit_status ();
}