From 3b2d8eb8130a5966b28d2426585f6fb077669002 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Mon, 26 Aug 2013 01:32:35 +0100 Subject: Added TERMKEY_FORMAT_LOWERSPACE for strfkey() only --- t/11strfkey.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't') 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, "", "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(); -- cgit v1.2.3-70-g09d2