lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY |
| 3 | * |
| 4 | * FILE: dat_wcschr.c |
| 5 | * |
| 6 | * WCSCHR: wchar_t *wcschr (const wchar_t *ws, wchar_t wc); |
| 7 | */ |
| 8 | |
| 9 | TST_WCSCHR tst_wcschr_loc [] = { |
| 10 | |
| 11 | { { Twcschr, TST_LOC_de }, |
| 12 | { |
| 13 | { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C0 }, /* #1 */ |
| 14 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 15 | }, |
| 16 | { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #2 */ |
| 17 | /*expect*/ { 0,0,0 }, |
| 18 | }, |
| 19 | { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C2 }, /* #3 */ |
| 20 | /*expect*/ { 0,0,0 }, |
| 21 | }, |
| 22 | { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C3 }, /* #4 */ |
| 23 | /*expect*/ { 0,0,0 }, |
| 24 | }, |
| 25 | { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #5 */ |
| 26 | /*expect*/ { 0,0,0 }, |
| 27 | }, |
| 28 | { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #6 */ |
| 29 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 30 | }, |
| 31 | { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #7 */ |
| 32 | /*expect*/ { 0,0,0 }, |
| 33 | }, |
| 34 | { .is_last = 1 } |
| 35 | } |
| 36 | }, |
| 37 | { { Twcschr, TST_LOC_enUS }, |
| 38 | { |
| 39 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0040 }, /* #1 */ |
| 40 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 41 | }, |
| 42 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0041 }, /* #2 */ |
| 43 | /*expect*/ { 0,0,0 }, |
| 44 | }, |
| 45 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0042 }, /* #3 */ |
| 46 | /*expect*/ { 0,0,0 }, |
| 47 | }, |
| 48 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0043 }, /* #4 */ |
| 49 | /*expect*/ { 0,0,0 }, |
| 50 | }, |
| 51 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0000 }, /* #5 */ |
| 52 | /*expect*/ { 0,0,0 }, |
| 53 | }, |
| 54 | { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0041 }, /* #6 */ |
| 55 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 56 | }, |
| 57 | { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0000 }, /* #7 */ |
| 58 | /*expect*/ { 0,0,0 }, |
| 59 | }, |
| 60 | { .is_last = 1 } |
| 61 | } |
| 62 | }, |
| 63 | #if 0 |
| 64 | { { Twcschr, TST_LOC_eucJP }, |
| 65 | #else |
| 66 | { { Twcschr, TST_LOC_ja_UTF8 }, |
| 67 | #endif |
| 68 | { |
| 69 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3040 }, /* #1 */ |
| 70 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 71 | }, |
| 72 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3041 }, /* #2 */ |
| 73 | /*expect*/ { 0,0,0 }, |
| 74 | }, |
| 75 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3042 }, /* #3 */ |
| 76 | /*expect*/ { 0,0,0 }, |
| 77 | }, |
| 78 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3043 }, /* #4 */ |
| 79 | /*expect*/ { 0,0,0 }, |
| 80 | }, |
| 81 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x0000 }, /* #5 */ |
| 82 | /*expect*/ { 0,0,0 }, |
| 83 | }, |
| 84 | { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x3041 }, /* #6 */ |
| 85 | /*expect*/ { 0,1,(wchar_t *)NULL }, |
| 86 | }, |
| 87 | { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x0000 }, /* #7 */ |
| 88 | /*expect*/ { 0,0,0 }, |
| 89 | }, |
| 90 | { .is_last = 1 } |
| 91 | } |
| 92 | }, |
| 93 | { { Twcschr, TST_LOC_end } } |
| 94 | }; |