2.9
[glibc/nacl-glibc.git] / localedata / tests-mbwc / dat_wcwidth.c
blobe50d963830239e9580e85c09d4f279c8a52eab57
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_wcwidth.c
6 * WCWIDTH: int wcwidth (wchar_t wc);
7 */
9 TST_WCWIDTH tst_wcwidth_loc [] = {
11 { Twcwidth, TST_LOC_de },
13 { /*inp*/ { 0x0000 }, /* #01 */
14 /*exp*/ { 0, 1,0, },
16 { /*inp*/ { 0x0020 }, /* #02 */
17 /*exp*/ { 0, 1,1, },
19 { /*inp*/ { 0x007F }, /* #03 */
20 /*exp*/ { 0, 1,-1, },
22 { /*inp*/ { 0x0080 }, /* #04 */
23 /*exp*/ { 0, 1,-1, },
25 { /*inp*/ { 0x00A1 }, /* #05 */
26 /*exp*/ { 0, 1,1, },
28 { /*inp*/ { 0x00C1 }, /* #06 */
29 /*exp*/ { 0, 1,1, },
31 #ifdef SHOJI_IS_RIGHT
32 /* <WAIVER> */ /* CHECK : wint_t */
33 { /*inp*/ { 0x3041 }, /* #07 */
34 /*exp*/ { 0, 1,0, },
36 #else
37 { /*inp*/ { 0x3041 }, /* #07 */
38 /*exp*/ { 0, 1,EOF, },
40 #endif
41 { .is_last = 1 }
45 { Twcwidth, TST_LOC_enUS },
47 { /*inp*/ { 0x0000 }, /* #01 */
48 /*exp*/ { 0, 1,0, },
50 { /*inp*/ { 0x0020 }, /* #02 */
51 /*exp*/ { 0, 1,1, },
53 { /*inp*/ { 0x007F }, /* #03 */
54 /*exp*/ { 0, 1,-1, },
56 { /*inp*/ { 0x0080 }, /* #04 */
57 /*exp*/ { 0, 1,-1, },
59 { /*inp*/ { 0x00A1 }, /* #05 */
60 /*exp*/ { 0, 1,-1, },
62 { /*inp*/ { 0x00C1 }, /* #06 */
63 /*exp*/ { 0, 1,-1, },
65 { /*inp*/ { 0x3041 }, /* #07 */
66 /*exp*/ { 0, 1,-1, },
68 { .is_last = 1 }
72 { Twcwidth, TST_LOC_eucJP },
74 { /*inp*/ { 0x0000 }, /* #01 */
75 /*exp*/ { 0, 1,0, },
77 { /*inp*/ { 0x0020 }, /* #02 */
78 /*exp*/ { 0, 1,1, },
80 { /*inp*/ { 0x007F }, /* #03 */
81 /*exp*/ { 0, 1,-1, },
83 { /*inp*/ { 0x0080 }, /* #04 */
84 /*exp*/ { 0, 1,-1, },
86 #ifdef SHOJI_IS_RIGHT
87 /* <NO_WAIVER> */
88 { /*inp*/ { 0x00A1 }, /* #05 */
89 /*exp*/ { 0, 1,0, },
91 #else
92 /* XXX U00A1 is a valid character in EUC-JP. */
93 { /*inp*/ { 0x00A1 }, /* #05 */
94 /*exp*/ { 0, 1,2, },
96 #endif
97 /* jisx0212 */
98 { /*inp*/ { 0x00C1 }, /* #06 */
99 /*exp*/ { 0, 1,2, },
101 { /*inp*/ { 0x3041 }, /* #07 */
102 /*exp*/ { 0, 1,2, },
104 { .is_last = 1 }
108 { Twcwidth, TST_LOC_end }