2011-03-31 12:38:40 +02:00
|
|
|
#include <stdio.h>
|
2011-03-31 14:51:21 +02:00
|
|
|
#include "../termkey.h"
|
2011-03-31 13:11:19 +02:00
|
|
|
#include "taplib.h"
|
2011-03-31 12:38:40 +02:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
TermKey *tk;
|
|
|
|
|
2012-03-08 22:24:39 +01:00
|
|
|
plan_tests(6);
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2012-01-26 13:55:34 +01:00
|
|
|
tk = termkey_new_abstract("vt100", 0);
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2012-01-26 13:55:34 +01:00
|
|
|
ok(!!tk, "termkey_new_abstract");
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2012-02-13 22:57:33 +01:00
|
|
|
is_int(termkey_get_buffer_size(tk), 256, "termkey_get_buffer_size");
|
2012-03-08 22:24:39 +01:00
|
|
|
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()");
|
2012-02-13 22:57:33 +01:00
|
|
|
|
2011-03-31 12:38:40 +02:00
|
|
|
termkey_destroy(tk);
|
|
|
|
|
2011-03-31 13:11:19 +02:00
|
|
|
ok(1, "termkey_free");
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2011-03-31 13:13:37 +02:00
|
|
|
return exit_status();
|
2011-03-31 12:38:40 +02:00
|
|
|
}
|