Revert "Remove redundant data for LC_MONETARY for Indian locales"
[glibc.git] / localedata / tests-mbwc / dat_wcsxfrm.c
blob231da3802970d4b6d813b920bfda2a0f8e128170
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
4 * FILE: dat_wcsxfrm.c
6 * WCSXFRM: size_t wcsxfrm (char *s1, const char s2, size_t n);
7 */
9 /*
10 * NOTE:
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 */
26 /*exp*/ { 0, 0,0, },
28 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
29 /*exp*/ { 0, 0,0, },
31 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
32 /*exp*/ { 0, 0,0, },
34 { /*inp*/ { { 0x00E4,0x0000 }, { 0x00DC,0x0000 }, 7, 7 }, /* #04 */
35 /*exp*/ { 0, 0,0, },
37 { /*inp*/ { { 0x00DC,0x0000 }, { 0x00E4,0x0000 }, 7, 7 }, /* #05 */
38 /*exp*/ { 0, 0,0, },
40 { .is_last = 1 }
44 { Twcsxfrm, TST_LOC_enUS },
46 { /*inp*/ { { 0x0041,0x0000 }, { 0x0041,0x0000 }, 7, 7 }, /* #01 */
47 /*exp*/ { 0, 0,0, },
49 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
50 /*exp*/ { 0, 0,0, },
52 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
53 /*exp*/ { 0, 0,0, },
55 { /*inp*/ { { 0x0000,0x0000 }, { 0x0000,0x0000 }, 7, 7 }, /* #04 */
56 /*exp*/ { 0, 0,0, },
58 #ifdef NO_WAIVER
59 { /* <WAIVER> x 2 */
60 /*inp*/ { { 0x3061,0x0000 }, { 0xFF42,0x0000 }, 7, 7 }, /* #05 */
61 /* <WAIVER> */
62 /*exp*/ { EINVAL, 1,(size_t)-1, },
64 #endif
65 { .is_last = 1 }
69 { Twcsxfrm, TST_LOC_eucJP }, /* need more test data ! */
71 { /*inp*/ { { 0x3041,0x0000 }, { 0x3041,0x0000 }, 7, 7 }, /* #01 */
72 /*exp*/ { 0, 0,0, },
74 { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
75 /*exp*/ { 0, 0,0, },
77 { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
78 /*exp*/ { 0, 0,0, },
80 { /*inp*/ { { 0x30A2,0x0000 }, { 0xFF71,0x0000 }, 7, 7 }, /* #04 */
81 /*exp*/ { 0, 0,0, },
83 { /*inp*/ { { 0xFF71,0x0000 }, { 0x30A2,0x0000 }, 7, 7 }, /* #05 */
84 /*exp*/ { 0, 0,0, },
86 #ifdef NO_WAIVER
87 /* <WAIVER> x 2 */
88 { /*inp*/ { { 0x008E,0x0000 }, { 0x008F,0x0000 }, 7, 7 }, /* #06 */
89 /*exp*/ { EINVAL, 1,(size_t)-1, },
91 #endif
92 { .is_last = 1 }
96 { Twcsxfrm, TST_LOC_end }