Force DT_RPATH for --enable-hardcoded-path-in-tests
[glibc.git] / localedata / tests-mbwc / dat_mbrlen.c
blob1df485e9c9075794ced8167b8c6800b79ff003b8
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, -2, },
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, -2, },
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, -2, },
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, -2, },
88 { EILSEQ, 1, -1, },
89 { EILSEQ, 1, -1, },
93 { .is_last = 1 }
97 { Tmbrlen, TST_LOC_eucJP },
99 { /*----------------- #01 -----------------*/
102 { 1, "\317\302", 1, 1, 1 },
103 { 0, "", 0, 1, 0 },
104 { 1, "\317\302", USE_MBCURMAX, 1, 1 },
109 { 0, 1, -2, },
110 { 0, 1, -1, },
111 { 0, 1, 2, },
115 { /*----------------- #02 -----------------*/
118 { 1, "\317", 1, 1, 0 },
119 { 1, "\302", 1, 1, 0 },
120 { 1, "\317\302", USE_MBCURMAX, 0, 0 },
125 { 0, 1, -2, },
126 /* XXX ISO C explicitly says that the return value does not
127 XXX reflect the bytes contained in the state. */
128 { 0, 1, +1, },
129 { 0, 1, 2, },
133 { /*----------------- #03 -----------------*/
136 { 1, "\216\217", 0, 0, 0 },
137 { 1, "\216\217", 1, 0, 0 },
138 { 1, "\216\217", USE_MBCURMAX, 0, 0 },
143 { 0, 1, -2, },
144 { 0, 1, -2, },
145 { EILSEQ, 1, -1, },
149 { .is_last = 1 }
153 { Tmbrlen, TST_LOC_end }