Mercurial > hg > octave-lyh > gnulib-hg
changeset 14375:5c0504048541
wcrtomb: Enhance test.
* tests/test-wcrtomb.c (main): Add test against bug with NULL argument.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 20 Feb 2011 14:08:44 +0100 |
parents | 85a5ffbc0cb3 |
children | b9dc068e378c |
files | ChangeLog tests/test-wcrtomb.c |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-20 Bruno Haible <bruno@clisp.org> + + wcrtomb: Enhance test. + * tests/test-wcrtomb.c (main): Add test against bug with NULL argument. + 2011-02-20 Bruno Haible <bruno@clisp.org> mbrtowc: Tiny optimization.
--- a/tests/test-wcrtomb.c +++ b/tests/test-wcrtomb.c @@ -105,6 +105,14 @@ } } + /* Test special calling convention, passing a NULL pointer. */ + { + ret = wcrtomb (NULL, '\0', NULL); + ASSERT (ret == 1); + ret = wcrtomb (NULL, btowc ('x'), NULL); + ASSERT (ret == 1); + } + if (argc > 1) switch (argv[1][0]) {