Added a termkey_is_started() accessor; unit test it a bit

This commit is contained in:
Paul LeoNerd Evans
2012-03-08 21:24:39 +00:00
parent 43a83e6e96
commit cb00476f09
3 changed files with 16 additions and 1 deletions

View File

@@ -6,13 +6,22 @@ int main(int argc, char *argv[])
{
TermKey *tk;
plan_tests(3);
plan_tests(6);
tk = termkey_new_abstract("vt100", 0);
ok(!!tk, "termkey_new_abstract");
is_int(termkey_get_buffer_size(tk), 256, "termkey_get_buffer_size");
ok(termkey_is_started(tk), "termkey_is_started true after construction");
termkey_stop(tk);
ok(!termkey_is_started(tk), "termkey_is_started false after termkey_stop()");
termkey_start(tk);
ok(termkey_is_started(tk), "termkey_is_started true after termkey_start()");
termkey_destroy(tk);