aboutsummaryrefslogtreecommitdiff
path: root/t/12strpkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 02:23:19 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 02:23:19 +0100
commit8e503baed8b1df3ed1901b0c93398f204244c77a (patch)
tree2d0c4f980192c0cb26511c9f6d7be875622fac83 /t/12strpkey.c
parent3b2d8eb8130a5966b28d2426585f6fb077669002 (diff)
downloadtermo-8e503baed8b1df3ed1901b0c93398f204244c77a.tar.gz
termo-8e503baed8b1df3ed1901b0c93398f204244c77a.tar.xz
termo-8e503baed8b1df3ed1901b0c93398f204244c77a.zip
Added TERMKEY_FORMAT_LOWERSPACE for strpkey() also
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 099fe9a..c532b6c 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(58);
+ plan_tests(62);
tk = termkey_new_abstract("vt100", 0);
@@ -94,6 +94,14 @@ int main(int argc, char *argv[])
is_str(endp, "", "consumed entire input for unicode/c/ALT altismeta+long/space+lowermod");
CLEAR_KEY;
+ endp = termkey_strpkey(tk, "ctrl alt page up", &key, TERMKEY_FORMAT_LONGMOD|TERMKEY_FORMAT_SPACEMOD|TERMKEY_FORMAT_LOWERMOD|TERMKEY_FORMAT_LOWERSPACE);
+ is_int(key.type, TERMKEY_TYPE_KEYSYM, "key.type for sym/PageUp/CTRL+ALT long/space/lowermod+lowerspace");
+ is_int(key.code.sym, TERMKEY_SYM_PAGEUP, "key.code.codepoint for sym/PageUp/CTRL+ALT long/space/lowermod+lowerspace");
+ is_int(key.modifiers, TERMKEY_KEYMOD_ALT | TERMKEY_KEYMOD_CTRL,
+ "key.modifiers for sym/PageUp/CTRL+ALT long/space/lowermod+lowerspace");
+ is_str(endp, "", "consumed entire input for sym/PageUp/CTRL+ALT long/space/lowermod+lowerspace");
+
+ 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");