Try to handle position reports -and- F3 concurrently.. somehow.. argh
This commit is contained in:
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
|
||||
TermKeyKey key;
|
||||
int line, col;
|
||||
|
||||
plan_tests(5);
|
||||
plan_tests(8);
|
||||
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
@@ -22,6 +22,16 @@ int main(int argc, char *argv[])
|
||||
is_int(line, 15, "line for position report");
|
||||
is_int(col, 7, "column for position report");
|
||||
|
||||
/* A plain CSI R is likely to be <F3> though.
|
||||
* This is tricky :/
|
||||
*/
|
||||
termkey_push_bytes(tk, "\e[R", 3);
|
||||
|
||||
is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for <F3>");
|
||||
|
||||
is_int(key.type, TERMKEY_TYPE_FUNCTION, "key.type for <F3>");
|
||||
is_int(key.code.number, 3, "key.code.number for <F3>");
|
||||
|
||||
termkey_destroy(tk);
|
||||
|
||||
return exit_status();
|
||||
|
||||
Reference in New Issue
Block a user