/* Test of opening a file stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 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 <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-int
-main ()
-{
- ASSERT (fopen ("nonexist.ent/", "w") == NULL);
- ASSERT (fopen ("/dev/null/", "r") == NULL);
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
+#define BASE "test-fopen.t"
- ASSERT (fopen ("/dev/null", "r") != NULL);
+#include "test-fopen.h"
- return 0;
+int
+main (void)
+{
+ return test_fopen ();
}