Browse Source

Simple compile fixes for tests.

Rusty Russell 17 years ago
parent
commit
868412b72b
2 changed files with 10 additions and 4 deletions
  1. 4 3
      ccan/grab_file/test/run-grab.c
  2. 6 1
      ccan/str_talloc/test/run.c

+ 4 - 3
ccan/grab_file/test/run-grab.c

@@ -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[])

+ 6 - 1
ccan/str_talloc/test/run.c

@@ -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);