test-stat-time: speed up execution
[gnulib.git] / tests / test-getdelim.c
index e33099b..0c112f6 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of getdelim() function.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008 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
@@ -29,6 +29,7 @@
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
@@ -47,14 +48,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 +85,6 @@ main (int argc, char **argv)
 
   free (line);
   fclose (f);
-  unlink ("test-getdelim.txt");
+  remove ("test-getdelim.txt");
   return 0;
 }