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
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2011-03-31 12:38:40 +02:00
|
|
|
{
|
2014-09-28 05:56:13 +02:00
|
|
|
termkey_t *tk;
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
plan_tests (6);
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
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");
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
termkey_stop (tk);
|
|
|
|
ok (!termkey_is_started (tk),
|
|
|
|
"termkey_is_started false after termkey_stop()");
|
2011-03-31 12:38:40 +02:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
termkey_start (tk);
|
|
|
|
ok (termkey_is_started (tk),
|
|
|
|
"termkey_is_started true after termkey_start()");
|
2012-03-08 22:24:39 +01:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
termkey_destroy (tk);
|
2012-03-08 22:24:39 +01:00
|
|
|
|
2014-09-28 05:56:13 +02:00
|
|
|
ok (1, "termkey_free");
|
|
|
|
return exit_status ();
|
2011-03-31 12:38:40 +02:00
|
|
|
}
|