Simple compile fixes for tests.
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 7 Dec 2008 09:46:52 +0000 (20:16 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 7 Dec 2008 09:46:52 +0000 (20:16 +1030)
ccan/grab_file/test/run-grab.c
ccan/str_talloc/test/run.c

index 2b36a0fb70d77ba03b59ae83cb64ab66e6acb56b..7df663c9ae11f8634d6eae26b8abd49bb853664f 100644 (file)
@@ -1,13 +1,14 @@
 /* This is test for grab_file() function
  */
-
+#include       "grab_file/grab_file.h"
 #include       <stdlib.h>
 #include       <stdio.h>
 #include       <err.h>
 #include       <sys/stat.h>
-#include       "string/string.h"
-#include       "string/string.c"
+#include       "grab_file/grab_file.c"
 #include       "tap/tap.h"
+#include       "str_talloc/str_talloc.h"
+#include       "str/str.h"
 
 int 
 main(int argc, char *argv[])
index 6da48bd0bc98f2c5fceb776012e08c5c1372b8b1..2e45aafe2c2a51e30f115af39a0610f865417249 100644 (file)
@@ -3,13 +3,18 @@
 #include <stdio.h>
 #include "str_talloc/str_talloc.c"
 #include "tap/tap.h"
+#include "str/str.h"
 
 /* FIXME: ccanize */
 #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[])
 {
-       unsigned int i, j, n;
+       unsigned int n;
+       char **split, *str;
+       void *ctx;
 
        plan_tests(19);
        split = strsplit(NULL, "hello  world", " ", &n);