2 * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
6 * STRXFRM: size_t strxfrm (char *s1, const char s2, size_t n);
13 * Return value and errno value are checked only for 2nd string:
14 * org2[]; n1 and n2 don't mean bytes to be translated.
15 * It means a buffer size including a null character.
16 * Results of this test depens on results of strcoll().
17 * If you got errors, check both test results.
19 * The buffer size should be enough to contain a string including a
20 * null char. Returns the number of bytes of the string (NOT
21 * including a null char).
26 TST_STRXFRM tst_strxfrm_loc
[] = {
28 { Tstrxfrm
, TST_LOC_de
},
30 { /*inp*/ { "\xf6\xc4\xe4\xfc", "\xf6\xc4\xe4\xfc", 17, 17 }, /* #01 */
33 { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
36 { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
39 { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
42 { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
45 { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
49 /* hiragana == latin1 */
50 /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
57 { Tstrxfrm
, TST_LOC_enUS
},
59 { /*inp*/ { "abcd", "abcd", 17, 17 }, /* #01 */
62 { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
65 { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
68 { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
71 { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
74 { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
80 /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
81 /*exp*/ { EINVAL
,0,0, },
88 { Tstrxfrm
, TST_LOC_eucJP
}, /* ??? */
92 /*inp*/ { "\244\242\244\241", "\244\241\244\242", 5, 5 },
97 /*inp*/ { "\244\241\244\242", "\244\242\244\241", 5, 5 },
102 /*inp*/ { "\244\242\216\261", "\216\261\244\242", 5, 5 },
107 /*inp*/ { "AAA", "\216\217", 5, 5 }, /* #04 */ /* <WAIVER> */
108 /*exp*/ { EINVAL
,0,0, },
115 { Tstrxfrm
, TST_LOC_end
}