diff tests/test-wcrtomb.c @ 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 97fc9a21a8fb
children 8250f2777afc
line wrap: on
line diff
--- 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])
       {