Mercurial > hg > octave-kai > gnulib-hg
changeset 13525:ac49cf58cb8b
readlink, areadlink: Relax test a bit.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 31 Jul 2010 22:43:19 +0200 |
parents | 7917fe0d070b |
children | 8af6b9d12697 |
files | ChangeLog tests/test-areadlink.h tests/test-readlink.h |
diffstat | 3 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-07-31 Bruno Haible <bruno@clisp.org> + + readlink, areadlink: Relax test a bit. + * tests/test-readlink.h (test_readlink): Accept EINVAL as an + alternative to ENOTDIR. + * tests/test-areadlink.h (test_areadlink): Likewise. + Reported by Rainer Tammer. + 2010-07-31 Bruno Haible <bruno@clisp.org> unistr/u8-strstr, unistr/u16-strstr: Optimize the one-character case.
--- a/tests/test-areadlink.h +++ b/tests/test-areadlink.h @@ -49,7 +49,7 @@ ASSERT (errno == EINVAL); errno = 0; ASSERT (func (BASE "file/", 1) == NULL); - ASSERT (errno == ENOTDIR); + ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */ ASSERT (unlink (BASE "file") == 0); /* Now test actual symlinks. */
--- a/tests/test-readlink.h +++ b/tests/test-readlink.h @@ -74,7 +74,7 @@ ASSERT (symlink (BASE "file", BASE "link2") == 0); errno = 0; ASSERT (func (BASE "link2/", buf, sizeof buf) == -1); - ASSERT (errno == ENOTDIR); + ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link2") == 0); {