aboutsummaryrefslogtreecommitdiff
path: root/tests/01base.c
blob: 1bcc1a9648d184256512fb6e1a942ce34477485e (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
32
#include <stdio.h>
#include "../termo.h"
#include "taplib.h"

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

	termo_t *tk;

	plan_tests (6);

	tk = termo_new_abstract ("vt100", NULL, 0);
	ok (!!tk, "termo_new_abstract");
	is_int (termo_get_buffer_size (tk), 256, "termo_get_buffer_size");
	ok (termo_is_started (tk), "termo_is_started true after construction");

	termo_stop (tk);
	ok (!termo_is_started (tk),
		"termo_is_started false after termo_stop()");

	termo_start (tk);
	ok (termo_is_started (tk),
		"termo_is_started true after termo_start()");

	termo_destroy (tk);

	ok (1, "termo_free");
	return exit_status ();
}