added missing dependencies to fix failing unistr/ tests
[gnulib.git] / tests / test-pipe.c
index 404534d..2dcab58 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of create_pipe_bidi/wait_subprocess.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 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
    duplicate the original stderr.  */
 
 #define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__);  \
-          fflush (myerr);                                                    \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
+static FILE *myerr;
 
 /* Code executed by the child process.  argv[1] = "child".  */
 static int
@@ -199,10 +190,10 @@ main (int argc, char *argv[])
   if (strcmp (argv[1], "child") == 0)
     {
       /* fd 2 might be closed, but fd BACKUP_STDERR_FILENO is the original
-        stderr.  */
+         stderr.  */
       myerr = fdopen (BACKUP_STDERR_FILENO, "w");
       if (!myerr)
-       return 2;
+        return 2;
       return child_main (argc, argv);
     }
   /* We might close fd 2 later, so save it in fd 10.  */