aboutsummaryrefslogtreecommitdiff
path: root/t/taplib.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-03-31 12:11:19 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-03-31 12:11:19 +0100
commit3bbda921b7180340ccc50c1a8a2bf01631508f36 (patch)
tree787f87e96597293bff639162ccb4a67c59fcb8eb /t/taplib.c
parent620038af7274a338160e9ad0a787cc21e4fc64ea (diff)
downloadtermo-3bbda921b7180340ccc50c1a8a2bf01631508f36.tar.gz
termo-3bbda921b7180340ccc50c1a8a2bf01631508f36.tar.xz
termo-3bbda921b7180340ccc50c1a8a2bf01631508f36.zip
Created a little Test::More-like library for TAP testing
Diffstat (limited to 't/taplib.c')
-rw-r--r--t/taplib.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/taplib.c b/t/taplib.c
new file mode 100644
index 0000000..0e8735a
--- /dev/null
+++ b/t/taplib.c
@@ -0,0 +1,23 @@
+#include "taplib.h"
+
+#include <stdio.h>
+
+static int nexttest = 1;
+static int _exit_status = 0;
+
+void plan_tests(int n)
+{
+ printf("1..%d\n", n);
+}
+
+void ok(int cmp, char *name)
+{
+ printf("%s %d - %s\n", cmp ? "ok" : "not ok", nexttest++, name);
+ if(!cmp)
+ _exit_status = 1;
+}
+
+int exit_status(void)
+{
+ return _exit_status;
+}