aboutsummaryrefslogtreecommitdiff
path: root/t/taplib.c
blob: 0e8735a2fb5c873a43279b15a7d030be9a721fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}