summaryrefslogtreecommitdiff
path: root/test/locale-mbwc/dat_wcwidth.c
blob: b6b7c2974f896a390838eb01bb54bda762e075f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
 *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
 *
 *	 FILE:	dat_wcwidth.c
 *
 *	 WCWIDTH:  int wcwidth (wchar_t wc);
 */

TST_WCWIDTH tst_wcwidth_loc [] = {
    {
      { Twcwidth, TST_LOC_de },
      {
	{ /*inp*/ { 0x0000		     },	 /* #01 */
	  /*exp*/ { 0,	1,0,	     },
	},
	{ /*inp*/ { 0x0020		     },	 /* #02 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x007F		     },	 /* #03 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x0080		     },	 /* #04 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x00C1		     },	 /* #06 */
	  /*exp*/ { 0,	1,1,	     },
	},
#ifdef SHOJI_IS_RIGHT
	/* <WAIVER> */	/* CHECK : wint_t */
	{ /*inp*/ { 0x3041		     },	 /* #07 */
	  /*exp*/ { 0,	1,0,	     },
	},
#else
	{ /*inp*/ { 0x3041		     },	 /* #07 */
	  /*exp*/ { 0,	1,EOF,	     },
	},
#endif
	{ .is_last = 1 }
      }
    },
    {
      { Twcwidth, TST_LOC_enUS },
      {
	{ /*inp*/ { 0x0000		     },	 /* #01 */
	  /*exp*/ { 0,	1,0,	     },
	},
	{ /*inp*/ { 0x0020		     },	 /* #02 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x007F		     },	 /* #03 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x0080		     },	 /* #04 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x00C1		     },	 /* #06 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x3041		     },	 /* #07 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ .is_last = 1 }
      }
    },
#if 0
    {
      { Twcwidth, TST_LOC_eucJP },
      {
	{ /*inp*/ { 0x0000		     },	 /* #01 */
	  /*exp*/ { 0,	1,0,	     },
	},
	{ /*inp*/ { 0x0020		     },	 /* #02 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x007F		     },	 /* #03 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x0080		     },	 /* #04 */
	  /*exp*/ { 0,	1,-1,	     },
	},
#ifdef SHOJI_IS_RIGHT
	/* <NO_WAIVER> */
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,0,	     },
	},
#else
	/* XXX U00A1 is a valid character in EUC-JP.  */
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,2,	     },
	},
#endif
	/* jisx0212 */
	{ /*inp*/ { 0x00C1		     },	 /* #06 */
	  /*exp*/ { 0,	1,2,	     },
	},
	{ /*inp*/ { 0x3041		     },	 /* #07 */
	  /*exp*/ { 0,	1,2,	     },
	},
	{ .is_last = 1 }
      }
    },
#else
    {
      { Twcwidth, TST_LOC_ja_UTF8 },
      {
	{ /*inp*/ { 0x0000		     },	 /* #01 */
	  /*exp*/ { 0,	1,0,	     },
	},
	{ /*inp*/ { 0x0020		     },	 /* #02 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x007F		     },	 /* #03 */
	  /*exp*/ { 0,	1,-1,	     },
	},
	{ /*inp*/ { 0x0080		     },	 /* #04 */
	  /*exp*/ { 0,	1,-1,	     },
	},
#ifdef SHOJI_IS_RIGHT
	/* <NO_WAIVER> */
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,0,	     },
	},
#else
	/* XXX U00A1 is a valid character in EUC-JP.UTF-8.  */
	{ /*inp*/ { 0x00A1		     },	 /* #05 */
	  /*exp*/ { 0,	1,1,	     },
	},
#endif
	/* jisx0212 */
	{ /*inp*/ { 0x00C1		     },	 /* #06 */
	  /*exp*/ { 0,	1,1,	     },
	},
	{ /*inp*/ { 0x3041		     },	 /* #07 */
	  /*exp*/ { 0,	1,2,	     },
	},
	{ .is_last = 1 }
      }
    },
#endif
    {
      { Twcwidth, TST_LOC_end }
    }
};