projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fdopen: Support for MSVC 9.
[gnulib.git]
/
tests
/
test-remove.c
diff --git
a/tests/test-remove.c
b/tests/test-remove.c
index
16bfe2f
..
15d5f27
100644
(file)
--- a/
tests/test-remove.c
+++ b/
tests/test-remove.c
@@
-1,5
+1,5
@@
/* Tests of remove.
/* Tests of remove.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009
-2011
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
@@
-20,6
+20,9
@@
#include <stdio.h>
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (remove, int, (char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
@@
-27,17
+30,8
@@
#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 "ignore-value.h"
+#include "macros.h"
#define BASE "test-remove.t"
#define BASE "test-remove.t"
@@
-45,7
+39,7
@@
int
main (void)
{
/* Remove any leftovers from a previous partial run. */
main (void)
{
/* Remove any leftovers from a previous partial run. */
-
ASSERT (system ("rm -rf " BASE "*") == 0
);
+
ignore_value (system ("rm -rf " BASE "*")
);
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
@@
-84,7
+78,7
@@
main (void)
/* Empty directory. */
errno = 0;
ASSERT (remove (BASE "dir/.//") == -1);
/* Empty directory. */
errno = 0;
ASSERT (remove (BASE "dir/.//") == -1);
- ASSERT (errno == EINVAL || errno == EBUSY);
+ ASSERT (errno == EINVAL || errno == EBUSY
|| errno == EEXIST
);
ASSERT (remove (BASE "dir") == 0);
/* Test symlink behavior. Specifying trailing slash should remove
ASSERT (remove (BASE "dir") == 0);
/* Test symlink behavior. Specifying trailing slash should remove