2005-02-21 Alan Modra <amodra@bigpond.net.au>
[glibc/history.git] / localedata / tests-mbwc / dat_mbrtowc.c
blobb8eb3dd2101649dc5481e1cfc362861065056468
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_mbrtowc.c
6 * MBTOWC: size_t mbrtowc (wchar_t *pwc, char *s, size_t n,
7 * mbstate_t *ps);
8 */
10 #include <limits.h>
12 /* Note:
13 assumes en_US = en_US.ascii
19 TST_MBRTOWC tst_mbrtowc_loc [] = {
21 { Tmbrtowc, TST_LOC_de },
23 { /*----------------- #01 -----------------*/
26 { 1, 1, "ÄÖÜ", 1, 0, 0 },
27 { 1, 1, "ÄÖÜ", 2, 0, 0 },
28 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
33 { 0, 1, 1, 0x00C4 },
34 { 0, 1, 1, 0x00C4 },
35 { 0, 1, 1, 0x00C4 },
39 { /*----------------- #02 -----------------*/
42 { 1, 1, "ÄÖÜ", 1, 0, 0 },
43 { 1, 1, "ÄÖÜ", 2, 0, 0 },
44 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
49 { 0, 1, 1, 0x00C4 },
50 { 0, 1, 1, 0x00C4 },
51 { 0, 1, 1, 0x00C4 },
55 { .is_last = 1 }
58 #if 0
59 /* XXX: These tests don't make sense to me. */
61 { Tmbrtowc, TST_LOC_enUS },
63 { /*----------------- #01 -----------------*/
66 { 1, 1, "ÄÖÜ", 1, 0, 0 },
67 { 1, 1, "ÄÖÜ", 2, 0, 0 },
68 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
73 { 0, 1, 1, 0x00C4 },
74 { 0, 1, 1, 0x00C4 },
75 { 0, 1, 1, 0x00C4 },
79 { /*----------------- #02 -----------------*/
82 { 1, 1, "ÄÖÜ", 1, 0, 0 },
83 { 1, 1, "ÄÖÜ", 2, 0, 0 },
84 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
89 { 0, 1, 1, 0x00C4 },
90 { 0, 1, 1, 0x00C4 },
91 { 0, 1, 1, 0x00C4 },
95 { .is_last = 1 }
99 { Tmbrtowc, TST_LOC_eucJP },
101 { /*----------------- #01 -----------------*/
104 { 1, 1, "ÄÖÜ", 1, 0, 0 },
105 { 1, 1, "ÄÖÜ", 2, 0, 0 },
106 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
111 { 0, 1, 1, 0x00C4 },
112 { 0, 1, 1, 0x00C4 },
113 { 0, 1, 1, 0x00C4 },
117 { /*----------------- #02 -----------------*/
120 { 1, 1, "ÄÖÜ", 1, 0, 0 },
121 { 1, 1, "ÄÖÜ", 2, 0, 0 },
122 { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
127 { 0, 1, 1, 0x00C4 },
128 { 0, 1, 1, 0x00C4 },
129 { 0, 1, 1, 0x00C4 },
133 { .is_last = 1 }
136 #endif
138 { Tmbrtowc, TST_LOC_end }