2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
6 * MBSTOWCS: size_t mbstowcs (wchar_t *ws, char *s, size_t n);
11 TST_MBSTOWCS tst_mbstowcs_loc
[] = {
13 { Tmbstowcs
, TST_LOC_de
},
15 { /*----------------- #01 -----------------*/
25 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
26 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
27 { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
31 { /*----------------- #02 -----------------*/
41 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
42 { 0,1,0, { 0x0000 } },
43 { 0,1,3, { 0x0000 } },
51 { Tmbstowcs
, TST_LOC_enUS
},
53 { /*----------------- #01 -----------------*/
63 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
64 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
65 { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
69 { /*----------------- #02 -----------------*/
79 { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
80 { 0,1,0, { 0x0000 } },
81 { 0,1,3, { 0x0000 } },
89 { Tmbstowcs
, TST_LOC_eucJP
},
91 { /*----------------- #01 -----------------*/
94 { 1, 1, "\244\242\244\244\244\246ABC", 7 },
95 { 1, 1, "\244\242\244\244\244\246ABC", 6 },
96 { 1, 1, "\244\242\244\244\244\246ABC", 4 },
101 { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
102 { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
103 { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
107 { /*----------------- #02 -----------------*/
110 #ifdef SHOJI_IS_RIGHT
111 /* XXX I really don't understand the first and third line.
112 the result of the first line is the same as the first
113 in the last test (i.e., returns 6). Also, the third
114 test will simply convert everything. */
115 { 1, 1, "\244\242\244\244\244\246ABC", 7 },
117 { 0, 1, "\244\242\244\244\244\246ABC", 7 },
119 { 1, 1, "\244\242\244\244\244\246ABC", 4 },
121 { 0, 1, "\244\242\244\244\244\246ABC", 0 },
127 { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
128 { 0,1,0, { 0x0000 } },
129 { 0,1,6, { 0x0000 } },
137 { Tmbstowcs
, TST_LOC_end
}