This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include "uniwidth.h"
22
23 #include "macros.h"
24
25 int
26 main ()
27 {
28 ucs4_t uc;
29
30
31 for (uc = 0x0020; uc < 0x007F; uc++)
32 ASSERT (uc_width (uc, "ISO-8859-2") == 1);
33
34
35 ASSERT (uc_width (0x0301, "UTF-8") == 0);
36 ASSERT (uc_width (0x05B0, "UTF-8") == 0);
37
38
39 ASSERT (uc_width (0x200E, "UTF-8") == 0);
40 ASSERT (uc_width (0x2060, "UTF-8") == 0);
41 ASSERT (uc_width (0xE0001, "UTF-8") == 0);
42 ASSERT (uc_width (0xE0044, "UTF-8") == 0);
43
44
45 ASSERT (uc_width (0x200B, "UTF-8") == 0);
46 ASSERT (uc_width (0xFEFF, "UTF-8") == 0);
47
48
49 ASSERT (uc_width (0x3000, "UTF-8") == 2);
50 ASSERT (uc_width (0xB250, "UTF-8") == 2);
51 ASSERT (uc_width (0xFF1A, "UTF-8") == 2);
52 ASSERT (uc_width (0x20369, "UTF-8") == 2);
53 ASSERT (uc_width (0x2F876, "UTF-8") == 2);
54
55 return 0;
56 }