Use termkey_new_abstract() in unit tests

This commit is contained in:
Paul LeoNerd Evans 2012-01-26 12:55:34 +00:00
parent ea2d3073ac
commit 50327ce6dc
9 changed files with 10 additions and 20 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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);

View File

@ -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");

View File

@ -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';

View File

@ -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);

View File

@ -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';

View File

@ -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);