X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-unlink.c;h=05c93ca40825ad0a75df75e23c0e0cf07f18259e;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=f5df9b6816291dccf49340e64bb2ad1af1b08f25;hpb=ff4e8f6b53d7b8c53856ba8ba2adaad3251e6a88;p=gnulib.git diff --git a/tests/test-unlink.c b/tests/test-unlink.c index f5df9b681..05c93ca40 100644 --- a/tests/test-unlink.c +++ b/tests/test-unlink.c @@ -1,5 +1,5 @@ /* Tests of unlink. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2014 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 @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unlink, int, (char const *)); + #include #include #include @@ -29,29 +32,18 @@ #include #include "unlinkdir.h" - -#if !HAVE_SYMLINK -# define symlink(a,b) (-1) -#endif - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "ignore-value.h" +#include "macros.h" #define BASE "test-unlink.t" #include "test-unlink.h" int -main () +main (void) { + /* Remove any leftovers from a previous partial run. */ + ignore_value (system ("rm -rf " BASE "*")); + return test_unlink_func (unlink, true); }