projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vc-list-files: indent with spaces, not TABs
[pspp]
/
tests
/
test-dup2.c
diff --git
a/tests/test-dup2.c
b/tests/test-dup2.c
index 35aa6ca474b8f9dd2f5a05267a25eab84f51f78a..e2ad88bccaf217d880e61548211530d2176f9368 100644
(file)
--- a/
tests/test-dup2.c
+++ b/
tests/test-dup2.c
@@
-169,7
+169,12
@@
main (void)
ASSERT (dup2 (fd + 1, fd + 1) == fd + 1);
ASSERT (!is_inheritable (fd + 1));
ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
ASSERT (dup2 (fd + 1, fd + 1) == fd + 1);
ASSERT (!is_inheritable (fd + 1));
ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
+ ASSERT (!is_inheritable (fd + 1));
ASSERT (is_inheritable (fd + 2));
ASSERT (is_inheritable (fd + 2));
+ errno = 0;
+ ASSERT (dup2 (fd + 1, -1) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (!is_inheritable (fd + 1));
#endif
/* On systems that distinguish between text and binary mode, dup2
#endif
/* On systems that distinguish between text and binary mode, dup2