diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2013-08-26 01:32:35 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2013-08-26 01:32:35 +0100 |
commit | 3b2d8eb8130a5966b28d2426585f6fb077669002 (patch) | |
tree | 67f078959a08a11c7ccf216c6442951e27c2e484 /t/11strfkey.c | |
parent | a36648e1721367e3e423be7a567aeeafc25e3f54 (diff) | |
download | termo-3b2d8eb8130a5966b28d2426585f6fb077669002.tar.gz termo-3b2d8eb8130a5966b28d2426585f6fb077669002.tar.xz termo-3b2d8eb8130a5966b28d2426585f6fb077669002.zip |
Added TERMKEY_FORMAT_LOWERSPACE for strfkey() only
Diffstat (limited to 't/11strfkey.c')
-rw-r--r-- | t/11strfkey.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/11strfkey.c b/t/11strfkey.c index 3125553..d271ead 100644 --- a/t/11strfkey.c +++ b/t/11strfkey.c @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) char buffer[16]; size_t len; - plan_tests(36); + plan_tests(40); tk = termkey_new_abstract("vt100", 0); @@ -102,6 +102,10 @@ int main(int argc, char *argv[]) is_int(len, 6, "length for sym/PageUp/0"); is_str(buffer, "PageUp", "buffer for sym/PageUp/0"); + len = termkey_strfkey(tk, buffer, sizeof buffer, &key, TERMKEY_FORMAT_LOWERSPACE); + is_int(len, 7, "length for sym/PageUp/0 lowerspace"); + is_str(buffer, "page up", "buffer for sym/PageUp/0 lowerspace"); + key.type = TERMKEY_TYPE_FUNCTION; key.code.number = 5; key.modifiers = 0; @@ -114,6 +118,10 @@ int main(int argc, char *argv[]) is_int(len, 4, "length for func/5/0 wrapbracket"); is_str(buffer, "<F5>", "buffer for func/5/0 wrapbracket"); + len = termkey_strfkey(tk, buffer, sizeof buffer, &key, TERMKEY_FORMAT_LOWERSPACE); + is_int(len, 2, "length for func/5/0 lowerspace"); + is_str(buffer, "f5", "buffer for func/5/0 lowerspace"); + termkey_destroy(tk); return exit_status(); |