2 * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
6 * SWSCANF: int swscanf (const wchar_t *s, const wchar_t *fmt, ...);
12 #include "tst_types.h"
13 #include "tgn_locdef.h"
16 TST_SWSCANF tst_swscanf_loc
[] =
19 { Tswscanf
, TST_LOC_de
},
21 /*------------------------ 01 -----------------------*/
23 0x002D, 0x0031, 0x003A, /* %d: -1 */
24 0x0032, 0x003A, /* %u: 2 */
25 0x0033, 0x002C, 0x0033, 0x003A, /* %f: 3.3 */
26 0x00E4, 0x003A, /* %c: 'ä' */
27 0x00C4, 0x00DC, 0x0000, 0x0000, /* %s: "ÄÜ" */
31 { /* The fields are: err_val, ret_flag, ret_val,
32 val_int, val_uns, val_flt, val_c, val_s, val_S. */
34 -1, 2, 3.3, 'ä', "ÄÜ", { 0x0000, },
37 /*------------------------ 02 -----------------------*/
39 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
44 0,0,0,0,"", { 0x00E4, 0x0000 },
47 /*------------------------ 03 -----------------------*/
49 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
54 0,0,0,0,"", { 0x00E4, 0x00C4, 0x0000 },
57 /*------------------------ 04 -----------------------*/
60 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
62 L
"1%d:2%d:3%d:4%d:5%d:6%d:7%d:8%d:9%d", 0
66 0,0,0,0,"", { 0x0000 },
69 0,0,0,0,"", { 0x0000 },
73 /*---------------------------------------------------*/
74 { .is_last
= 1} /* Last element. */
78 { Tswscanf
, TST_LOC_enUS
},
80 /*------------------------ 01 -----------------------*/
81 { { { 0x002D, 0x0031, 0x003A,
83 0x0035, 0x0034, 0x002E, 0x0033, 0x0045, 0x002D, 0x0031, 0x003A,
85 0x0061, 0x0062, 0x0000, 0x0000,
90 -1, 2, 5.43, 'A', "ab", { 0x0000 },
93 /*------------------------ 02 -----------------------*/
96 0x0063, 0x0064, 0x0000
101 0,0,0,0,"", { 0x0063, 0x0000 },
104 /*------------------------ 03 -----------------------*/
106 0x0063, 0x0064, 0x0000
111 0,0,0,0,"", { 0x0063, 0x0064, 0x0000 },
114 /*---------------------------------------------------*/
115 { .is_last
= 1} /* Last element. */
119 { Tswscanf
, TST_LOC_eucJP
},
121 /*------------------------ 01 -----------------------*/
122 { { { 0x002D, 0x0031, 0x003A,
124 0x0033, 0x002E, 0x0033, 0x003A,
126 0x0061, 0x0062, 0x0000, 0x0000,
131 -1, 2, 3.3, 'b', "ab", { 0x0000 }
134 /*------------------------ 02 -----------------------*/
136 0x30A2, 0x30A4, 0x0000
141 0,0,0,0,"", { 0x30A2, 0x30A4, 0x0000 }
144 /*------------------------ 03 -----------------------*/
148 0x0033, 0x002E, 0x0039, 0x003A,
150 0x0063, 0x0064, 0x0000, 0x0000,
152 L
"%2$d:%1$u:%3$f:%4$c:%5$s", 0
155 0, 1, 3.9, 'a', "cd", { 0x0000 }
158 #ifdef SHOJI_IS_RIGHT
159 /* XXX This test does not make sense. The format string is
160 L"\x1\x2\x25\x53" and it is supposed to match the words
161 0x30A2, 0x30A4, 0x0001. */
162 /*------------------------ 04 -----------------------*/
163 /* <NO_WAIVER> x 2 */
165 0x30A2, 0x30A4, 0x0001, 0x0000
167 { 0x0001,0x0002,0x0025,0x0053,0x0000 }, 'S'
170 0,0,0,0,"", { 0x0000 }
174 /*---------------------------------------------------*/
175 { .is_last
= 1} /* Last element. */
179 { Tswscanf
, TST_LOC_end
}