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 { { Twcschr, TST_LOC_eucJP }, 64 { 65 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3040 }, /* #1 */ 66 /*expect*/ { 0,1,(wchar_t *)NULL }, 67 }, 68 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3041 }, /* #2 */ 69 /*expect*/ { 0,0,0 }, 70 }, 71 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3042 }, /* #3 */ 72 /*expect*/ { 0,0,0 }, 73 }, 74 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3043 }, /* #4 */ 75 /*expect*/ { 0,0,0 }, 76 }, 77 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x0000 }, /* #5 */ 78 /*expect*/ { 0,0,0 }, 79 }, 80 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x3041 }, /* #6 */ 81 /*expect*/ { 0,1,(wchar_t *)NULL }, 82 }, 83 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x0000 }, /* #7 */ 84 /*expect*/ { 0,0,0 }, 85 }, 86 { .is_last = 1 } 87 } 88 }, 89 { { Twcschr, TST_LOC_end } } 90 }; 91