ubacktrace/uargp: remove unneeded and false linker scripts
[uclibc-ng.git] / test / locale-mbwc / dat_mbrlen.c
blob63ae19fb265e3b9333fced5be87446250c54980d
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_mbrlen.c
6 * MBRLEN: size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
7 */
9 /*
10 * NOTE:
11 * (1) A mbstate object is initialized for
12 * every new data record by the test program.
14 * (2) USE_MBCURMAX is defined as a value of 99.
19 TST_MBRLEN tst_mbrlen_loc [] = {
21 { Tmbrlen, TST_LOC_de },
23 { /*----------------- #01 -----------------*/
26 { 1, "", 0, 0, 0 },
27 { 1, "", 1, 0, 0 },
28 { 1, "\300", USE_MBCURMAX, 0, 0 },
33 { 0, 1, 0, },
34 { 0, 1, 0, },
35 { 0, 1, 1, },
39 { /*----------------- #02 -----------------*/
42 { 1, "\300\001", 0, 0, 0 },
43 { 1, "\300\001", 1, 0, 0 },
44 { 1, "\317\001", USE_MBCURMAX, 0, 0 },
49 { 0, 1, 0, },
50 { 0, 1, 1, },
51 { 0, 1, 1, },
55 { .is_last = 1 }
59 { Tmbrlen, TST_LOC_enUS },
61 { /*----------------- #01 -----------------*/
64 { 1, "A", 0, 0, 0 },
65 { 1, "A", 1, 0, 0 },
66 { 1, "A", USE_MBCURMAX, 0, 0 },
71 { 0, 1, 0, },
72 { 0, 1, 1, },
73 { 0, 1, 1, },
77 { /*----------------- #02 -----------------*/
80 { 1, "\317\001", 0, 1, 0 },
81 { 1, "\317\001", 1, 1, 0 },
82 { 1, "\317\001", USE_MBCURMAX, 1, 0 },
87 { 0, 1, 0, },
88 { EILSEQ, 1, -1, },
89 { EILSEQ, 1, -1, },
93 { .is_last = 1 }
96 #if 0
98 { Tmbrlen, TST_LOC_eucJP },
100 { /*----------------- #01 -----------------*/
103 { 1, "\317\302", 1, 1, 1 },
104 { 0, "", 0, 1, 0 },
105 { 1, "\317\302", USE_MBCURMAX, 1, 1 },
110 { 0, 1, -2, },
111 { 0, 1, -1, },
112 { 0, 1, 2, },
116 { /*----------------- #02 -----------------*/
119 { 1, "\317", 1, 1, 0 },
120 { 1, "\302", 1, 1, 0 },
121 { 1, "\317\302", USE_MBCURMAX, 0, 0 },
126 { 0, 1, -2, },
127 #ifdef SHOJI_IS_RIGHT
128 { 0, 1, +2, },
129 #else
130 /* XXX ISO C explicitly says that the return value does not
131 XXX reflect the bytes contained in the state. */
132 { 0, 1, +1, },
133 #endif
134 { 0, 1, 2, },
138 { /*----------------- #03 -----------------*/
141 { 1, "\216\217", 0, 0, 0 },
142 { 1, "\216\217", 1, 0, 0 },
143 { 1, "\216\217", USE_MBCURMAX, 0, 0 },
148 { 0, 1, 0, },
149 { 0, 1, -2, },
150 { EILSEQ, 1, -1, },
154 { .is_last = 1 }
157 #else
159 { Tmbrlen, TST_LOC_ja_UTF8 },
161 { /*----------------- #01 -----------------*/
164 { 1, "\345\222\214", 1, 1, 1 },
165 { 0, "", 0, 1, 0 },
166 { 1, "\345\222\214", USE_MBCURMAX, 1, 1 },
171 { 0, 1, -2, },
172 { 0, 1, -1, },
173 { 0, 1, 3, },
177 { /*----------------- #02 -----------------*/
180 { 1, "\317", 1, 1, 0 },
181 { 1, "\266", 1, 1, 0 },
182 { 1, "\345\222\214", USE_MBCURMAX, 0, 0 },
187 { 0, 1, -2, },
188 #ifdef SHOJI_IS_RIGHT
189 { 0, 1, +2, },
190 #else
191 /* XXX ISO C explicitly says that the return value does not
192 XXX reflect the bytes contained in the state. */
193 { 0, 1, +1, },
194 #endif
195 { 0, 1, 3, },
199 { /*----------------- #03 -----------------*/
202 { 1, "\302\303", 0, 0, 0 },
203 { 1, "\302\303", 1, 0, 0 },
204 { 1, "\302\303", USE_MBCURMAX, 0, 0 },
209 { 0, 1, 0, },
210 { 0, 1, -2, },
211 { EILSEQ, 1, -1, },
215 { .is_last = 1 }
218 #endif
220 { Tmbrlen, TST_LOC_end }