aboutsummaryrefslogtreecommitdiff
path: root/t/12strpkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 00:56:07 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 00:56:07 +0100
commit24abb0c59e78c2b7a660ca05f5afb6c514555ca5 (patch)
tree3a7a88cf6fc334b659d7af89e664599e854578c3 /t/12strpkey.c
parent89ac8b058cb7bb8f7bc47a4a42fa5642abc84dae (diff)
downloadtermo-24abb0c59e78c2b7a660ca05f5afb6c514555ca5.tar.gz
termo-24abb0c59e78c2b7a660ca05f5afb6c514555ca5.tar.xz
termo-24abb0c59e78c2b7a660ca05f5afb6c514555ca5.zip
Added TERMKEY_FORMAT_SPACEMOD
Diffstat (limited to 't/12strpkey.c')
-rw-r--r--t/12strpkey.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/12strpkey.c b/t/12strpkey.c
index 28c32f5..9f20883 100644
--- a/t/12strpkey.c
+++ b/t/12strpkey.c
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
#define CLEAR_KEY do { key.type = -1; key.code.codepoint = -1; key.modifiers = -1; key.utf8[0] = 0; } while(0)
- plan_tests(53);
+ plan_tests(58);
tk = termkey_new_abstract("vt100", 0);
@@ -86,6 +86,14 @@ int main(int argc, char *argv[])
is_str(endp, "", "consumed entire input for unicode/c/ALT altismeta+longmod");
CLEAR_KEY;
+ endp = termkey_strpkey(tk, "Meta c", &key, TERMKEY_FORMAT_ALTISMETA|TERMKEY_FORMAT_LONGMOD|TERMKEY_FORMAT_SPACEMOD);
+ is_int(key.type, TERMKEY_TYPE_UNICODE, "key.type for unicode/c/ALT altismeta+long/lowermod");
+ is_int(key.code.codepoint, 'c', "key.code.codepoint for unicode/c/ALT altismeta+long/lowermod");
+ is_int(key.modifiers, TERMKEY_KEYMOD_ALT, "key.modifiers for unicode/c/ALT altismeta+long/lowermod");
+ is_str(key.utf8, "c", "key.utf8 for unicode/c/ALT altismeta+long/lowermod");
+ is_str(endp, "", "consumed entire input for unicode/c/ALT altismeta+longmod");
+
+ CLEAR_KEY;
endp = termkey_strpkey(tk, "Up", &key, 0);
is_int(key.type, TERMKEY_TYPE_KEYSYM, "key.type for sym/Up/0");
is_int(key.code.sym, TERMKEY_SYM_UP, "key.code.codepoint for sym/Up/0");