From 7988979a722b4cdf287b2093956a76a3f19b9897 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Oct 2016 20:22:12 +0200 Subject: add uClibc-ng test directory --- test/locale-mbwc/tst2_mbrtowc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/locale-mbwc/tst2_mbrtowc.c (limited to 'test/locale-mbwc/tst2_mbrtowc.c') diff --git a/test/locale-mbwc/tst2_mbrtowc.c b/test/locale-mbwc/tst2_mbrtowc.c new file mode 100644 index 0000000..92e1283 --- /dev/null +++ b/test/locale-mbwc/tst2_mbrtowc.c @@ -0,0 +1,21 @@ +#include +#include +#include + +/* bugs.uclibc.org/1471 : make sure output is 0 */ +static int +do_test(void) +{ + wchar_t output; + int result; + + output = L'A'; /* anything other than 0 will do... */ + result = mbrtowc (&output, "", 1, 0); + + assert (result == 0); + assert (output == 0); + + return EXIT_SUCCESS; +} +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" -- cgit v1.2.3