X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fopen.c;h=29d783946323ae410a4b6b4f5e4b778f9f2845ec;hb=82381b9e5b37125305709d412d8322b35e5c4796;hp=f1b7b6d329777bddfd8cb54c32ccdf32004cc347;hpb=bf22d71aabc025f08e01ade3fd65a34eb8e823dd;p=gnulib.git diff --git a/tests/test-fopen.c b/tests/test-fopen.c index f1b7b6d32..29d783946 100644 --- a/tests/test-fopen.c +++ b/tests/test-fopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 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,26 +19,13 @@ #include #include -#include - -#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); +#define BASE "test-fopen.t" - ASSERT (fopen ("/dev/null", "r") != NULL); +#include "test-fopen.h" - return 0; +int +main (void) +{ + return test_fopen (); }