2 * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
6 * WCSXFRM: size_t wcsxfrm (char *s1, const char s2, size_t n);
12 * Return value and errno value are checked only for 2nd string:
13 * org2[]; n1 and n2 don't mean bytes to be translated.
14 * It means a buffer size including a null character.
15 * Results of this test depens on results of wcscoll().
16 * If you got errors, check both test results.
20 TST_WCSXFRM tst_wcsxfrm_loc
[] = {
23 { Twcsxfrm
, TST_LOC_de
},
25 { /*inp*/ { { 0x00C1,0x0000 }, { 0x00C1,0x0000 }, 7, 7 }, /* #01 */
28 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
31 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
34 { /*inp*/ { { 0x00E4,0x0000 }, { 0x00DC,0x0000 }, 7, 7 }, /* #04 */
37 { /*inp*/ { { 0x00DC,0x0000 }, { 0x00E4,0x0000 }, 7, 7 }, /* #05 */
44 { Twcsxfrm
, TST_LOC_enUS
},
46 { /*inp*/ { { 0x0041,0x0000 }, { 0x0041,0x0000 }, 7, 7 }, /* #01 */
49 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
52 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
55 { /*inp*/ { { 0x0000,0x0000 }, { 0x0000,0x0000 }, 7, 7 }, /* #04 */
60 /*inp*/ { { 0x3061,0x0000 }, { 0xFF42,0x0000 }, 7, 7 }, /* #05 */
62 /*exp*/ { EINVAL
, 1,(size_t)-1, },
69 { Twcsxfrm
, TST_LOC_eucJP
}, /* need more test data ! */
71 { /*inp*/ { { 0x3041,0x0000 }, { 0x3041,0x0000 }, 7, 7 }, /* #01 */
74 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
77 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
80 { /*inp*/ { { 0x30A2,0x0000 }, { 0xFF71,0x0000 }, 7, 7 }, /* #04 */
83 { /*inp*/ { { 0xFF71,0x0000 }, { 0x30A2,0x0000 }, 7, 7 }, /* #05 */
88 { /*inp*/ { { 0x008E,0x0000 }, { 0x008F,0x0000 }, 7, 7 }, /* #06 */
89 /*exp*/ { EINVAL
, 1,(size_t)-1, },
96 { Twcsxfrm
, TST_LOC_end
}