projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup after gl_FUNC_READLINK, for gl_FUNC_SYMLINK test
[gnulib.git]
/
tests
/
test-areadlinkat.c
diff --git
a/tests/test-areadlinkat.c
b/tests/test-areadlinkat.c
index
6b0c96c
..
cb5848a
100644
(file)
--- a/
tests/test-areadlinkat.c
+++ b/
tests/test-areadlinkat.c
@@
-1,5
+1,5
@@
/* Tests of areadlinkat.
/* Tests of areadlinkat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009
, 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
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
@@
-29,17
+29,7
@@
#include <sys/stat.h>
#include <unistd.h>
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-areadlinkat.t"
#define BASE "test-areadlinkat.t"
@@
-49,18
+39,18
@@
static int dfd = AT_FDCWD;
/* Wrapper for testing areadlinkat. */
static char *
/* Wrapper for testing areadlinkat. */
static char *
-do_areadlinkat (char const *name, size_t ignored _
UNUSED_PARAMETER_
)
+do_areadlinkat (char const *name, size_t ignored _
GL_UNUSED
)
{
return areadlinkat (dfd, name);
}
int
{
return areadlinkat (dfd, name);
}
int
-main ()
+main (
void
)
{
int result;
/* Remove any leftovers from a previous partial run. */
{
int result;
/* Remove any leftovers from a previous partial run. */
-
ASSERT (system ("rm -rf " BASE "*") == 0
);
+
system ("rm -rf " BASE "*"
);
/* Basic tests. */
result = test_areadlink (do_areadlinkat, false);
/* Basic tests. */
result = test_areadlink (do_areadlinkat, false);
@@
-70,7
+60,7
@@
main ()
/* Relative tests. */
if (result == 77)
/* Relative tests. */
if (result == 77)
- fputs ("skipping test: symlinks not supported on this filesystem\n",
+ fputs ("skipping test: symlinks not supported on this file
system\n",
stderr);
else
{
stderr);
else
{