2011-09-20 Bruno Haible <bruno@clisp.org>
+ utimens, futimens, fdutimensat tests: EBADF tests.
+ * tests/test-futimens.h (test_futimens): Add more tests for EBADF.
+
Tests for function fstat().
* modules/fstat-tests: New file.
* tests/test-fstat.c: New file.
}
/* Invalid arguments. */
- errno = 0;
- ASSERT (func (AT_FDCWD, NULL) == -1);
- ASSERT (errno == EBADF);
- errno = 0;
- ASSERT (func (-1, NULL) == -1);
- ASSERT (errno == EBADF);
+ {
+ errno = 0;
+ ASSERT (func (AT_FDCWD, NULL) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ errno = 0;
+ ASSERT (func (-1, NULL) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ errno = 0;
+ ASSERT (func (99, NULL) == -1);
+ ASSERT (errno == EBADF);
+ }
{
int fd = dup (0);
ASSERT (0 <= fd);