[BZ #3427]
[glibc.git] / localedata / tests-mbwc / dat_mbsrtowcs.c
blobe1ee1819a866cda536cd1a3179f9e6c6df35346f
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_mbsrtowcs.c
6 * MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, char **s, size_t n,
7 * mbstate_t *ps);
8 */
11 TST_MBSRTOWCS tst_mbsrtowcs_loc [] = {
13 { Tmbsrtowcs, TST_LOC_de },
15 { /*----------------- #01 -----------------*/
18 { 1, "üäö", 4, 0,0 },
19 { 1, "üäö", 3, 0,0 },
20 { 1, "üäö", 2, 0,0 },
25 { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
26 { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
27 { 0,1,2, { 0x00FC,0x00E4,0x00F6,0x0000 } },
31 { /*----------------- #02 -----------------*/
34 { 1, "üäö", 4, 0,0 },
35 { 1, "", 1, 0,0 },
36 { 0, "üäö", 4, 0,0 },
41 { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
42 { 0,1,0, { 0x0000 } },
43 { 0,1,3, { 0x0000 } },
47 { /*----------------- END -----------------*/
48 .is_last = 1
54 { Tmbsrtowcs, TST_LOC_enUS },
56 { /*----------------- #01 -----------------*/
59 { 1, "ABC", 4, 0,0 },
60 { 1, "ABC", 3, 0,0 },
61 { 1, "ABC", 2, 0,0 },
66 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
67 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
68 { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
72 { /*----------------- #02 -----------------*/
75 { 1, "ABC", 4, 0,0 },
76 { 1, "", 1, 0,0 },
77 { 0, "ABC", 4, 0,0 },
82 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
83 { 0,1,0, { 0x0000 } },
84 { 0,1,3, { 0x0000 } },
88 { /*----------------- END -----------------*/
89 .is_last = 1
95 { Tmbsrtowcs, TST_LOC_eucJP },
97 { /*----------------- #01 -----------------*/
100 { 1, "\244\242\244\244\244\246ABC", 7, 0,0 },
101 { 1, "\244\242\244\244\244\246ABC", 6, 0,0 },
102 { 1, "\244\242\244\244\244\246ABC", 4, 0,0 },
107 { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
108 { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
109 { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
113 { /*----------------- #02 -----------------*/
116 { 1, "\244\242\244\244\244\246ABC", 7, 0,0 },
117 { 1, "", 1, 0,0 },
118 { 0, "\244\242\244\244\244\246ABC", 7, 0,0 },
123 { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
124 { 0,1,0, { 0x0000 } },
125 { 0,1,6, { 0x0000 } },
129 { /*----------------- END -----------------*/
130 .is_last = 1
135 { Tmbsrtowcs, TST_LOC_end }