tst2_mbrtowc.c 407 B

123456789101112131415161718192021
  1. #include <wchar.h>
  2. #include <assert.h>
  3. #include <stdlib.h>
  4. /* bugs.uclibc.org/1471 : make sure output is 0 */
  5. static int
  6. do_test(void)
  7. {
  8. wchar_t output;
  9. int result;
  10. output = L'A'; /* anything other than 0 will do... */
  11. result = mbrtowc (&output, "", 1, 0);
  12. assert (result == 0);
  13. assert (output == 0);
  14. return EXIT_SUCCESS;
  15. }
  16. #define TEST_FUNCTION do_test ()
  17. #include "../test-skeleton.c"