2.9
[glibc/nacl-glibc.git] / localedata / tests-mbwc / dat_wcschr.c
blob3e256f75510e050fe81911f879f42ece675d6eca
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_wcschr.c
6 * WCSCHR: wchar_t *wcschr (const wchar_t *ws, wchar_t wc);
7 */
9 TST_WCSCHR tst_wcschr_loc [] = {
11 { { Twcschr, TST_LOC_de },
13 { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C0 }, /* #1 */
14 /*expect*/ { 0,1,(wchar_t *)NULL },
16 { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #2 */
17 /*expect*/ { 0,0,0 },
19 { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C2 }, /* #3 */
20 /*expect*/ { 0,0,0 },
22 { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C3 }, /* #4 */
23 /*expect*/ { 0,0,0 },
25 { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #5 */
26 /*expect*/ { 0,0,0 },
28 { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #6 */
29 /*expect*/ { 0,1,(wchar_t *)NULL },
31 { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #7 */
32 /*expect*/ { 0,0,0 },
34 { .is_last = 1 }
37 { { Twcschr, TST_LOC_enUS },
39 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0040 }, /* #1 */
40 /*expect*/ { 0,1,(wchar_t *)NULL },
42 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0041 }, /* #2 */
43 /*expect*/ { 0,0,0 },
45 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0042 }, /* #3 */
46 /*expect*/ { 0,0,0 },
48 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0043 }, /* #4 */
49 /*expect*/ { 0,0,0 },
51 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0000 }, /* #5 */
52 /*expect*/ { 0,0,0 },
54 { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0041 }, /* #6 */
55 /*expect*/ { 0,1,(wchar_t *)NULL },
57 { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0000 }, /* #7 */
58 /*expect*/ { 0,0,0 },
60 { .is_last = 1 }
63 { { Twcschr, TST_LOC_eucJP },
65 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3040 }, /* #1 */
66 /*expect*/ { 0,1,(wchar_t *)NULL },
68 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3041 }, /* #2 */
69 /*expect*/ { 0,0,0 },
71 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3042 }, /* #3 */
72 /*expect*/ { 0,0,0 },
74 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3043 }, /* #4 */
75 /*expect*/ { 0,0,0 },
77 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x0000 }, /* #5 */
78 /*expect*/ { 0,0,0 },
80 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x3041 }, /* #6 */
81 /*expect*/ { 0,1,(wchar_t *)NULL },
83 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x0000 }, /* #7 */
84 /*expect*/ { 0,0,0 },
86 { .is_last = 1 }
89 { { Twcschr, TST_LOC_end } }