diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-11-30 15:36:06 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-11-30 15:36:06 +0000 |
commit | efc5b7e088fc219993f22dc827022b143913c1f8 (patch) | |
tree | a0e070f4a8d59872c12c7cea3217d7f3448f7c48 /t | |
parent | 8152f9e0184de47bc87fcde593c3b34e04bea1fe (diff) | |
download | termo-efc5b7e088fc219993f22dc827022b143913c1f8.tar.gz termo-efc5b7e088fc219993f22dc827022b143913c1f8.tar.xz termo-efc5b7e088fc219993f22dc827022b143913c1f8.zip |
Try to handle position reports -and- F3 concurrently.. somehow.. argh
Diffstat (limited to 't')
-rw-r--r-- | t/31position.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/31position.c b/t/31position.c index bb798c6..3304643 100644 --- a/t/31position.c +++ b/t/31position.c @@ -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(); |