Commit 868412b7 authored by Rusty Russell's avatar Rusty Russell

Simple compile fixes for tests.

parent be74c29b
/* This is test for grab_file() function /* This is test for grab_file() function
*/ */
#include "grab_file/grab_file.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <err.h> #include <err.h>
#include <sys/stat.h> #include <sys/stat.h>
#include "string/string.h" #include "grab_file/grab_file.c"
#include "string/string.c"
#include "tap/tap.h" #include "tap/tap.h"
#include "str_talloc/str_talloc.h"
#include "str/str.h"
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
......
...@@ -3,13 +3,18 @@ ...@@ -3,13 +3,18 @@
#include <stdio.h> #include <stdio.h>
#include "str_talloc/str_talloc.c" #include "str_talloc/str_talloc.c"
#include "tap/tap.h" #include "tap/tap.h"
#include "str/str.h"
/* FIXME: ccanize */ /* FIXME: ccanize */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
static char *substrings[] = { "far", "bar", "baz", "b", "ba", "z", "ar", NULL };
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
unsigned int i, j, n; unsigned int n;
char **split, *str;
void *ctx;
plan_tests(19); plan_tests(19);
split = strsplit(NULL, "hello world", " ", &n); split = strsplit(NULL, "hello world", " ", &n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment