diff options
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | t/01base.c | 20 |
2 files changed, 29 insertions, 0 deletions
@@ -81,6 +81,15 @@ doc: $(BUILTMAN) %.3: %.3.sh sh $< >$@ +TESTSOURCES=$(wildcard t/*.c) +TESTFILES=$(TESTSOURCES:.c=.t) + +t/%.t: t/%.c $(LIBRARY) + $(LIBTOOL) --mode=link --tag=CC gcc -o $@ $^ + +test: $(TESTFILES) + prove -e "" + clean: clean-built clean-built: diff --git a/t/01base.c b/t/01base.c new file mode 100644 index 0000000..7fbddc0 --- /dev/null +++ b/t/01base.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include "termkey.h" + +int main(int argc, char *argv[]) +{ + TermKey *tk; + + printf("1..2\n"); + + tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + + printf(tk ? "" : "not "); + printf("ok 1 - termkey_new\n"); + + termkey_destroy(tk); + + printf("ok 2 - termkey_free\n"); + + return 0; +} |