/* Test of opening a subcommand stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2011 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 "stdio--.h"
/* Helpers. */
-#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
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;
int
main (int argc, char **argv)