aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-03-08 21:24:39 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-03-08 21:24:39 +0000
commitcb00476f09d5ab7e342f562e6c516f23c98aac88 (patch)
tree131208b1525223daa17a78fdb5e4e90032923c1d /t
parent43a83e6e96ce1bce7fffa2060278d7acdaafa445 (diff)
downloadtermo-cb00476f09d5ab7e342f562e6c516f23c98aac88.tar.gz
termo-cb00476f09d5ab7e342f562e6c516f23c98aac88.tar.xz
termo-cb00476f09d5ab7e342f562e6c516f23c98aac88.zip
Added a termkey_is_started() accessor; unit test it a bit
Diffstat (limited to 't')
-rw-r--r--t/01base.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/01base.c b/t/01base.c
index 54ad44d..463a0ed 100644
--- a/t/01base.c
+++ b/t/01base.c
@@ -6,13 +6,22 @@ int main(int argc, char *argv[])
{
TermKey *tk;
- plan_tests(3);
+ 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);