2.9
[glibc/nacl-glibc.git] / localedata / tests-mbwc / dat_wcspbrk.c
bloba7f8f6e1cf8785cbb1ed3c44b11d9fa698804741
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_wcspbrk.c
6 * WCSSTR: wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2);
7 */
11 * NOTE:
12 * This is not a locale sensitive function.
13 * So those data in each locale doesn't make sense
14 * ... (redundant test cases)
18 TST_WCSPBRK tst_wcspbrk_loc [] = {
20 { Twcspbrk, TST_LOC_de },
22 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
23 { 0x00D1,0x0000 }, }, /* #01 */
24 /*expect*/ { 0,0,0, 0x00D1 },
26 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
27 { 0x00D2,0x0000 }, }, /* #02 */
28 /*expect*/ { 0,0,0, 0x00D2 },
30 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
31 { 0x00D3,0x0000 }, }, /* #03 */
32 /*expect*/ { 0,0,0, 0x00D3 },
34 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
35 { 0x00D1,0x00D2,0x0000 }, }, /* #04 */
36 /*expect*/ { 0,0,0, 0x00D1 },
38 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
39 { 0x00D2,0x00D3,0x0000 }, }, /* #05 */
40 /*expect*/ { 0,0,0, 0x00D2 },
42 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
43 { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #06 */
44 /*expect*/ { 0,0,0, 0x00D1 },
46 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
47 { 0x00D0,0x00D4,0x00D5,0x0000 }, }, /* #07 */
48 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
50 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
51 { 0x00D5,0x00D0,0x00D4,0x0000 }, }, /* #08 */
52 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
54 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
55 { 0x0000 }, }, /* #09 */
56 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
58 { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
59 { 0x00D1,0x0000 }, }, /* #10 */
60 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
62 { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
63 { 0x0000 }, }, /* #11 */
64 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
66 { .is_last = 1 }
70 { Twcspbrk, TST_LOC_enUS },
72 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
73 { 0x0041,0x0000 }, }, /* #01 */
74 /*expect*/ { 0,0,0, 0x0041 },
76 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
77 { 0x0042,0x0000 }, }, /* #02 */
78 /*expect*/ { 0,0,0, 0x0042 },
80 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
81 { 0x0043,0x0000 }, }, /* #03 */
82 /*expect*/ { 0,0,0, 0x0043 },
84 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
85 { 0x0041,0x0042,0x0000 }, }, /* #04 */
86 /*expect*/ { 0,0,0, 0x0041 },
88 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
89 { 0x0042,0x0043,0x0000 }, }, /* #05 */
90 /*expect*/ { 0,0,0, 0x0042 },
92 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
93 { 0x0041,0x0042,0x0043,0x0000 }, }, /* #06 */
94 /*expect*/ { 0,0,0, 0x0041 },
96 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
97 { 0x0040,0x0044,0x0045,0x0000 }, }, /* #07 */
98 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
100 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
101 { 0x0045,0x0040,0x0044,0x0000 }, }, /* #08 */
102 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
104 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
105 { 0x0000 }, }, /* #09 */
106 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
108 { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
109 { 0x0041,0x0000 }, }, /* #10 */
110 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
112 { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
113 { 0x0000 }, }, /* #11 */
114 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
116 { .is_last = 1 }
120 { Twcspbrk, TST_LOC_eucJP },
122 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
123 { 0x3041,0x0000 }, }, /* #01 */
124 /*expect*/ { 0,0,0, 0x3041 },
126 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
127 { 0x3042,0x0000 }, }, /* #02 */
128 /*expect*/ { 0,0,0, 0x3042 },
130 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
131 { 0x3043,0x0000 }, }, /* #03 */
132 /*expect*/ { 0,0,0, 0x3043 },
134 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
135 { 0x3041,0x3042,0x0000 }, }, /* #04 */
136 /*expect*/ { 0,0,0, 0x3041 },
138 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
139 { 0x3042,0x3043,0x0000 }, }, /* #05 */
140 /*expect*/ { 0,0,0, 0x3042 },
142 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
143 { 0x3041,0x3042,0x3043,0x0000 }, }, /* #06 */
144 /*expect*/ { 0,0,0, 0x3041 },
146 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
147 { 0x3042,0x3043,0x3044,0x0000 }, }, /* #07 */
148 /*expect*/ { 0,0,0, 0x3042 },
150 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
151 { 0x3040,0x3041,0x3042,0x0000 }, }, /* #08 */
152 /*expect*/ { 0,0,0, 0x3041 },
154 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
155 { 0x0000 }, }, /* #09 */
156 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
158 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
159 { 0x3041,0x0000 }, }, /* #10 */
160 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
162 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
163 { 0x0000 }, }, /* #11 */
164 /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
166 { .is_last = 1 }
170 { Twcspbrk, TST_LOC_end }