diff options
Diffstat (limited to 't/01base.c')
-rw-r--r-- | t/01base.c | 36 |
1 files changed, 17 insertions, 19 deletions
@@ -2,30 +2,28 @@ #include "../termkey.h" #include "taplib.h" -int main(int argc, char *argv[]) +int +main (int argc, char *argv[]) { - TermKey *tk; + termkey_t *tk; - plan_tests(6); + plan_tests (6); - tk = termkey_new_abstract("vt100", 0); + tk = termkey_new_abstract ("vt100", NULL, 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"); - ok(!!tk, "termkey_new_abstract"); + termkey_stop (tk); + ok (!termkey_is_started (tk), + "termkey_is_started false after termkey_stop()"); - is_int(termkey_get_buffer_size(tk), 256, "termkey_get_buffer_size"); - ok(termkey_is_started(tk), "termkey_is_started true after construction"); + termkey_start (tk); + ok (termkey_is_started (tk), + "termkey_is_started true after termkey_start()"); - termkey_stop(tk); + termkey_destroy (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); - - ok(1, "termkey_free"); - - return exit_status(); + ok (1, "termkey_free"); + return exit_status (); } |