X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-fopen.c;h=d788d84e343d9c9d3eb8e9adbb5025dc455a0de6;hb=e6b310e3cd8d3eec494f0c886bd407920faccb4a;hp=b9e3694071e248f86304f55e34300ff621c1c98c;hpb=fb8c836ade0d4ab8050c2c381795ce098b701115;p=gnulib.git diff --git a/tests/test-fopen.c b/tests/test-fopen.c index b9e369407..d788d84e3 100644 --- a/tests/test-fopen.c +++ b/tests/test-fopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2009 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 @@ -19,31 +19,16 @@ #include #include -#include - -#if GNULIB_FOPEN_SAFER -# include "stdio--.h" -#endif - -#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 (); }