From: Bruno Haible Date: Sun, 20 Feb 2011 13:08:44 +0000 (+0100) Subject: wcrtomb: Enhance test. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f07b719106c179e95958a048f2582b398cf84e7;p=pspp wcrtomb: Enhance test. * tests/test-wcrtomb.c (main): Add test against bug with NULL argument. --- diff --git a/ChangeLog b/ChangeLog index dbdc5303b5..715ebcc086 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-20 Bruno Haible + + wcrtomb: Enhance test. + * tests/test-wcrtomb.c (main): Add test against bug with NULL argument. + 2011-02-20 Bruno Haible mbrtowc: Tiny optimization. diff --git a/tests/test-wcrtomb.c b/tests/test-wcrtomb.c index 48bae41eb3..a50817ffad 100644 --- a/tests/test-wcrtomb.c +++ b/tests/test-wcrtomb.c @@ -105,6 +105,14 @@ main (int argc, char *argv[]) } } + /* 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]) {