dup2 tests: EBADF tests.
* tests/test-dup2.c (main): Add more tests for EBADF.
author |
Bruno Haible <bruno@clisp.org> |
date |
Tue, 20 Sep 2011 21:56:23 +0200 |
parents |
942664e0a177 |
children |
e186705ad0d3 |
files |
ChangeLog tests/test-dup2.c |
diffstat |
2 files changed, 6 insertions(+), 0 deletions(-)
[+]
|
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-09-20 Bruno Haible <bruno@clisp.org>
+ dup2 tests: EBADF tests.
+ * tests/test-dup2.c (main): Add more tests for EBADF.
+
Tests for module 'dup'.
* modules/dup-tests: New file.
* tests/test-dup.c: New file.
--- a/tests/test-dup2.c
+++ b/tests/test-dup2.c
@@ -121,6 +121,9 @@
ASSERT (dup2 (-1, fd) == -1);
ASSERT (errno == EBADF);
errno = 0;
+ ASSERT (dup2 (99, fd) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
ASSERT (dup2 (AT_FDCWD, fd) == -1);
ASSERT (errno == EBADF);
ASSERT (is_open (fd));