+/* Include the C files directly. */
+#include <ccan/failtest/failtest.c>
#include <stdlib.h>
#include <setjmp.h>
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <ccan/tap/tap.h>
-/* Include the C files directly. */
-#include <ccan/failtest/failtest.c>
int main(void)
{
struct stat st;
plan_tests(12);
+ failtest_init(0, NULL);
if (pipe(pfd))
abort();
}
/* Check it is read-write. */
ok1(write(fd, buf, strlen(buf)) == strlen(buf));
- lseek(fd, SEEK_SET, 0);
+ lseek(fd, 0, SEEK_SET);
ok1(read(fd, buf, strlen("Hello world!")) == strlen("Hello world!"));
ok1(strcmp(buf, "Hello world!") == 0);