Remove use of ranlib.
[glibc.git] / localedata / tests-mbwc / dat_strxfrm.c
blob2642be4a666d2dab81e19eeb5e07556f50349795
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
4 * FILE: dat_strxfrm.c
6 * STRXFRM: size_t strxfrm (char *s1, const char s2, size_t n);
7 */
11 * NOTE:
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 */
31 /*exp*/ { 0,0,0, },
33 { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
34 /*exp*/ { 0,0,0 , },
36 { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
37 /*exp*/ { 0,0,0, },
39 { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
40 /*exp*/ { 0,0,0, },
42 { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
43 /*exp*/ { 0,0,0, },
45 { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
46 /*exp*/ { 0,0,0, },
49 /* hiragana == latin1 */
50 /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
51 /*exp*/ { 0,0,0, },
53 { .is_last = 1 }
57 { Tstrxfrm, TST_LOC_enUS },
59 { /*inp*/ { "abcd", "abcd", 17, 17 }, /* #01 */
60 /*exp*/ { 0,0,0, },
62 { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
63 /*exp*/ { 0,0,0 , },
65 { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
66 /*exp*/ { 0,0,0, },
68 { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
69 /*exp*/ { 0,0,0, },
71 { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
72 /*exp*/ { 0,0,0, },
74 { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
75 /*exp*/ { 0,0,0, },
77 #ifdef NO_WAIVER
79 /* <WAIVER> */
80 /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
81 /*exp*/ { EINVAL,0,0, },
83 #endif
84 { .is_last = 1 }
88 { Tstrxfrm, TST_LOC_eucJP }, /* ??? */
91 /* #01 */
92 /*inp*/ { "\244\242\244\241", "\244\241\244\242", 5, 5 },
93 /*exp*/ { 0,0,0, },
96 /* #02 */
97 /*inp*/ { "\244\241\244\242", "\244\242\244\241", 5, 5 },
98 /*exp*/ { 0,0,0, },
101 /* #03 */
102 /*inp*/ { "\244\242\216\261", "\216\261\244\242", 5, 5 },
103 /*exp*/ { 0,0,0, },
105 #ifdef NO_WAIVER
107 /*inp*/ { "AAA", "\216\217", 5, 5 }, /* #04 */ /* <WAIVER> */
108 /*exp*/ { EINVAL,0,0, },
110 #endif
111 { .is_last = 1 }
115 { Tstrxfrm, TST_LOC_end }