aboutsummaryrefslogtreecommitdiff
path: root/t/01base.c
blob: 463a0edc09ee9064d44d5ddffe5d2f159a607430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include "../termkey.h"
#include "taplib.h"

int main(int argc, char *argv[])
{
  TermKey   *tk;

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

  ok(1, "termkey_free");

  return exit_status();
}