1/*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
3 *
4 * FILE: dat_wcwidth.c
5 *
6 * WCWIDTH: int wcwidth (wchar_t wc);
7 */
8
9TST_WCWIDTH tst_wcwidth_loc [] = {
10 {
11 { Twcwidth, TST_LOC_de },
12 {
13 { /*inp*/ { 0x0000 }, /* #01 */
14 /*exp*/ { 0, 1,0, },
15 },
16 { /*inp*/ { 0x0020 }, /* #02 */
17 /*exp*/ { 0, 1,1, },
18 },
19 { /*inp*/ { 0x007F }, /* #03 */
20 /*exp*/ { 0, 1,-1, },
21 },
22 { /*inp*/ { 0x0080 }, /* #04 */
23 /*exp*/ { 0, 1,-1, },
24 },
25 { /*inp*/ { 0x00A1 }, /* #05 */
26 /*exp*/ { 0, 1,1, },
27 },
28 { /*inp*/ { 0x00C1 }, /* #06 */
29 /*exp*/ { 0, 1,1, },
30 },
31 { /*inp*/ { 0x3041 }, /* #07 */
32 /*exp*/ { 0, 1,EOF, },
33 },
34 { .is_last = 1 }
35 }
36 },
37 {
38 { Twcwidth, TST_LOC_enUS },
39 {
40 { /*inp*/ { 0x0000 }, /* #01 */
41 /*exp*/ { 0, 1,0, },
42 },
43 { /*inp*/ { 0x0020 }, /* #02 */
44 /*exp*/ { 0, 1,1, },
45 },
46 { /*inp*/ { 0x007F }, /* #03 */
47 /*exp*/ { 0, 1,-1, },
48 },
49 { /*inp*/ { 0x0080 }, /* #04 */
50 /*exp*/ { 0, 1,-1, },
51 },
52 { /*inp*/ { 0x00A1 }, /* #05 */
53 /*exp*/ { 0, 1,-1, },
54 },
55 { /*inp*/ { 0x00C1 }, /* #06 */
56 /*exp*/ { 0, 1,-1, },
57 },
58 { /*inp*/ { 0x3041 }, /* #07 */
59 /*exp*/ { 0, 1,-1, },
60 },
61 { .is_last = 1 }
62 }
63 },
64 {
65 { Twcwidth, TST_LOC_eucJP },
66 {
67 { /*inp*/ { 0x0000 }, /* #01 */
68 /*exp*/ { 0, 1,0, },
69 },
70 { /*inp*/ { 0x0020 }, /* #02 */
71 /*exp*/ { 0, 1,1, },
72 },
73 { /*inp*/ { 0x007F }, /* #03 */
74 /*exp*/ { 0, 1,-1, },
75 },
76 { /*inp*/ { 0x0080 }, /* #04 */
77 /*exp*/ { 0, 1,-1, },
78 },
79 /* XXX U00A1 is a valid character in EUC-JP. */
80 { /*inp*/ { 0x00A1 }, /* #05 */
81 /*exp*/ { 0, 1,2, },
82 },
83 /* jisx0212 */
84 { /*inp*/ { 0x00C1 }, /* #06 */
85 /*exp*/ { 0, 1,2, },
86 },
87 { /*inp*/ { 0x3041 }, /* #07 */
88 /*exp*/ { 0, 1,2, },
89 },
90 { .is_last = 1 }
91 }
92 },
93 {
94 { Twcwidth, TST_LOC_end }
95 }
96};
97

source code of glibc/localedata/tests-mbwc/dat_wcwidth.c