diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2010-11-28 21:09:47 +0100 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2010-11-28 21:09:47 +0100 |
commit | 57f6cce72c889f2e7b342e87a565a064320a6ee2 (patch) | |
tree | 5466406472918d3adb63398f5fb9ea1511a5e73f /test/locale-mbwc | |
parent | 4ec89b87bc0eea8d9ca6b50564d12eeb3b1b0119 (diff) | |
parent | 5dea871ac73ef4608022c058b50adc946917f9b9 (diff) |
Merge commit 'origin/master' into prelink
Conflicts:
ldso/include/dl-hash.h
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'test/locale-mbwc')
-rw-r--r-- | test/locale-mbwc/Makefile.in | 4 | ||||
-rw-r--r-- | test/locale-mbwc/tst2_mbrtowc.c | 21 |
2 files changed, 23 insertions, 2 deletions
diff --git a/test/locale-mbwc/Makefile.in b/test/locale-mbwc/Makefile.in index 05c232a9b..7c0e9d529 100644 --- a/test/locale-mbwc/Makefile.in +++ b/test/locale-mbwc/Makefile.in @@ -15,8 +15,8 @@ TESTS := tst_iswalnum tst_iswalpha tst_iswcntrl \ tst_wcspbrk tst_wcsrtombs tst_wcsspn tst_wcsstr \ tst_wcstod tst_wcstok tst_wcstombs tst_wcswidth \ tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ - tst_wctype tst_wcwidth tst_strfmon - + tst_wctype tst_wcwidth tst_strfmon \ + tst2_mbrtowc # NOTE: For now disabled tst_strfmon to avoid build failure. TESTS_DISABLED := tst_strfmon diff --git a/test/locale-mbwc/tst2_mbrtowc.c b/test/locale-mbwc/tst2_mbrtowc.c new file mode 100644 index 000000000..92e12838c --- /dev/null +++ b/test/locale-mbwc/tst2_mbrtowc.c @@ -0,0 +1,21 @@ +#include <wchar.h> +#include <assert.h> +#include <stdlib.h> + +/* 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" |