update nearly all FSF copyright year lists to include 2010
[pspp] / tests / test-getdelim.c
index e33099b9cef484d07c537da33570369e816888c0..df9966497e46a26a30d6a8429586d2955efcff9e 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of getdelim() function.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2010 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *));
+
 #include <stdlib.h>
 #include <string.h>
 
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-        {                                                                   \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          abort ();                                                         \
-        }                                                                   \
-    }                                                                       \
-  while (0)
+#include "macros.h"
 
 int
-main (int argc, char **argv)
+main (void)
 {
   FILE *f;
   char *line = NULL;
@@ -47,14 +42,14 @@ main (int argc, char **argv)
   if (!f || fwrite ("anbcnd\0f", 1, 8, f) != 8 || fclose (f) != 0)
     {
       fputs ("Failed to create sample file.\n", stderr);
-      unlink ("test-getdelim.txt");
+      remove ("test-getdelim.txt");
       return 1;
     }
   f = fopen ("test-getdelim.txt", "rb");
   if (!f)
     {
       fputs ("Failed to reopen sample file.\n", stderr);
-      unlink ("test-getdelim.txt");
+      remove ("test-getdelim.txt");
       return 1;
     }
 
@@ -84,6 +79,6 @@ main (int argc, char **argv)
 
   free (line);
   fclose (f);
-  unlink ("test-getdelim.txt");
+  remove ("test-getdelim.txt");
   return 0;
 }