X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-unsetenv.c;h=50600a9082c8174162de4607da6bec7a413160fe;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=2815cf3a398a806d96bb53686192847613ebad52;hpb=91e21656de5ae1e87d23465ce46e738be45a7254;p=gnulib.git diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c index 2815cf3a3..50600a908 100644 --- a/tests/test-unsetenv.c +++ b/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - 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,22 +20,14 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unsetenv, int, (char const *)); + #include -#include #include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" int main (void) @@ -43,7 +35,7 @@ main (void) char entry[] = "b=2"; /* Test removal when multiple entries present. */ - ASSERT (putenv ("a=1") == 0); + ASSERT (putenv ((char *) "a=1") == 0); ASSERT (putenv (entry) == 0); entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */ ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */