aboutsummaryrefslogtreecommitdiff
path: root/t/01base.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-09-28 05:56:13 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-09-28 13:03:04 +0200
commit3465d5553fbe88a75320d1da3f7228619492b036 (patch)
treeb2086113248a918c8863dadb58a5736a2be75583 /t/01base.c
parent36bc6cd0952b2eddc17e7da803d85decf96d32cc (diff)
downloadtermo-3465d5553fbe88a75320d1da3f7228619492b036.tar.gz
termo-3465d5553fbe88a75320d1da3f7228619492b036.tar.xz
termo-3465d5553fbe88a75320d1da3f7228619492b036.zip
Make the tests work again
Our UTF-8 parsing now behaves differently, though.
Diffstat (limited to 't/01base.c')
-rw-r--r--t/01base.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/t/01base.c b/t/01base.c
index 463a0ed..39e0e39 100644
--- a/t/01base.c
+++ b/t/01base.c
@@ -2,30 +2,28 @@
#include "../termkey.h"
#include "taplib.h"
-int main(int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
- TermKey *tk;
+ termkey_t *tk;
- plan_tests(6);
+ plan_tests (6);
- tk = termkey_new_abstract("vt100", 0);
+ 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");
- ok(!!tk, "termkey_new_abstract");
+ termkey_stop (tk);
+ ok (!termkey_is_started (tk),
+ "termkey_is_started false after termkey_stop()");
- is_int(termkey_get_buffer_size(tk), 256, "termkey_get_buffer_size");
- ok(termkey_is_started(tk), "termkey_is_started true after construction");
+ termkey_start (tk);
+ ok (termkey_is_started (tk),
+ "termkey_is_started true after termkey_start()");
- termkey_stop(tk);
+ termkey_destroy (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();
+ ok (1, "termkey_free");
+ return exit_status ();
}