Include header file being tested immediately after config.h.
[pspp] / tests / test-argv-iter.c
index 507075409966bb39404cf99f298aed8417bc2510..fffa425c7f63790bb855c3a9317473ff393849f8 100644 (file)
@@ -17,6 +17,9 @@
 /* Written by Jim Meyering.  */
 
 #include <config.h>
+
+#include "argv-iter.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -35,8 +38,6 @@
     }                                                                        \
   while (0)
 
-#include "argv-iter.h"
-
 static FILE *
 write_nul_delimited_argv (char **argv)
 {
@@ -54,14 +55,17 @@ write_nul_delimited_argv (char **argv)
 }
 
 int
-main ()
+main (void)
 {
   /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
+  static char one[] = "1";
+  static char two[] = "2";
+  static char three[] = "3";
   static char *av[][4] = {
     {NULL},
-    {"1", NULL},
-    {"1", "2", NULL},
-    {"1", "2", "3", NULL}
+    {one, NULL},
+    {one, two, NULL},
+    {one, two, three, NULL}
   };
 
   int use_stream;