Use termkey_new_abstract() in unit tests
This commit is contained in:
parent
ea2d3073ac
commit
50327ce6dc
|
@ -8,9 +8,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(2);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
ok(!!tk, "termkey_new");
|
||||
ok(!!tk, "termkey_new_abstract");
|
||||
|
||||
termkey_destroy(tk);
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <stdio.h>
|
||||
#include "../termkey.h"
|
||||
#include "taplib.h"
|
||||
|
||||
|
@ -9,10 +8,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(27);
|
||||
|
||||
/* Sanitise this just in case */
|
||||
putenv("TERM=vt100");
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
is_int(termkey_get_buffer_remaining(tk), 256, "buffer free initially 256");
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(57);
|
||||
|
||||
/* Sanitise this just in case */
|
||||
putenv("TERM=vt100");
|
||||
|
||||
tk = termkey_new(-1, TERMKEY_FLAG_UTF8);
|
||||
tk = termkey_new_abstract("vt100", TERMKEY_FLAG_UTF8);
|
||||
|
||||
termkey_push_bytes(tk, "a", 1);
|
||||
|
||||
|
|
|
@ -9,10 +9,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(8);
|
||||
|
||||
/* Sanitise this just in case */
|
||||
putenv("TERM=vt100");
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
termkey_push_bytes(tk, " ", 1);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(10);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
sym = termkey_keyname2sym(tk, "Space");
|
||||
is_int(sym, TERMKEY_SYM_SPACE, "keyname2sym Space");
|
||||
|
|
|
@ -10,7 +10,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(28);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
key.type = TERMKEY_TYPE_UNICODE;
|
||||
key.code.codepoint = 'A';
|
||||
|
|
|
@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(53);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
CLEAR_KEY;
|
||||
endp = termkey_strpkey(tk, "A", &key, 0);
|
||||
|
|
|
@ -8,7 +8,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(12);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
key1.type = TERMKEY_TYPE_UNICODE;
|
||||
key1.code.codepoint = 'A';
|
||||
|
|
|
@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
plan_tests(26);
|
||||
|
||||
tk = termkey_new(-1, 0);
|
||||
tk = termkey_new_abstract("vt100", 0);
|
||||
|
||||
CLEAR_KEY;
|
||||
endp = termkey_strpkey(tk, " ", &key, 0);
|
||||
|
|
Loading…
Reference in New Issue