aboutsummaryrefslogtreecommitdiff
path: root/t/taplib.c
diff options
context:
space:
mode:
Diffstat (limited to 't/taplib.c')
-rw-r--r--t/taplib.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/t/taplib.c b/t/taplib.c
index 5c23a6e..f9e7425 100644
--- a/t/taplib.c
+++ b/t/taplib.c
@@ -12,11 +12,23 @@ void plan_tests(int n)
printf("1..%d\n", n);
}
+void pass(char *name)
+{
+ printf("ok %d - %s\n", nexttest++, name);
+}
+
+void fail(char *name)
+{
+ printf("not ok %d - %s\n", nexttest++, name);
+ _exit_status = 1;
+}
+
void ok(int cmp, char *name)
{
- printf("%s %d - %s\n", cmp ? "ok" : "not ok", nexttest++, name);
- if(!cmp)
- _exit_status = 1;
+ if(cmp)
+ pass(name);
+ else
+ fail(name);
}
void diag(char *fmt, ...)