U00A0 is now print.
[kopensolaris-gnu/glibc.git] / localedata / tests-mbwc / dat_wcsncpy.c
1 /*
2  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
3  *
4  *       FILE:  dat_wcsncpy.c
5  *
6  *       WCSNCPY:  wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2,
7  *                                   size_t n);
8  */
9
10
11 /* Note:
12  *
13  *       An initial value of ws1 in the test program is defined as:
14  *
15  *       #define WCSNUM_NCPY 7
16  *       wchar_t ws1 [WCSSIZE] = { 0x9999, 0x9999, 0x9999, 0x9999,
17  *                                 0x9999, 0x9999, 0x0000 };
18  * */
19
20
21 TST_WCSNCPY tst_wcsncpy_loc [] = {
22   {
23     {Twcsncpy, TST_LOC_de},
24     {
25       /* 1 */
26       {{           { 0x00D1,0x00D2,0x00D3,0x0000                      }, 6 },
27        {    0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x0000,0x0000 }    },
28       },
29       /* 2 */
30       {{           { 0x00D1,0x00D2,0x00D3,0x0000                      }, 5 },
31        {    0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x9999,0x0000 }    },
32       },
33       /* 3 */
34       {{           { 0x00D1,0x00D2,0x00D3,0x0000                      }, 3 },
35        {    0,0,0, { 0x00D1,0x00D2,0x00D3,0x9999,0x9999,0x9999,0x0000 }    },
36       },
37       /* 4 */
38       {{           { 0x00D1,0x00D2,0x00D3,0x0000                      }, 2 },
39        {    0,0,0, { 0x00D1,0x00D2,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
40       },
41       /* 5 */
42       {{           { 0x00D1,0x00D2,0x00D3,0x0000                      }, 0 },
43        {    0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
44       },
45       /* 6 */
46       {{           { 0x0000,0x00D2,0x00D3,0x0000                      }, 3 },
47        {    0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 }    },
48       },
49       {is_last: 1}
50     }
51   },
52   {
53     {Twcsncpy, TST_LOC_enUS},
54     {
55       /* 1 */
56       {{           { 0x0041,0x0042,0x0043,0x0000                      }, 6 },
57        {    0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x0000,0x0000 }    },
58       },
59       /* 2 */
60       {{           { 0x0041,0x0042,0x0043,0x0000                      }, 5 },
61        {    0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x9999,0x0000 }    },
62       },
63       /* 3 */
64       {{           { 0x0041,0x0042,0x0043,0x0000                      }, 3 },
65        {    0,0,0, { 0x0041,0x0042,0x0043,0x9999,0x9999,0x9999,0x0000 }    },
66       },
67       /* 4 */
68       {{           { 0x0041,0x0042,0x0043,0x0000                      }, 2 },
69        {    0,0,0, { 0x0041,0x0042,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
70       },
71       /* 5 */
72       {{           { 0x0041,0x0042,0x0043,0x0000                      }, 0 },
73        {    0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
74       },
75       /* 6 */
76       {{           { 0x0000,0x0042,0x0043,0x0000                      }, 3 },
77        {    0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 }    },
78       },
79       {is_last: 1}
80     }
81   },
82   {
83     {Twcsncpy, TST_LOC_eucJP},
84     {
85       /* 1 */
86       {{           { 0x3041,0x3042,0x3043,0x0000                      }, 6 },
87        {    0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x0000,0x0000 }    },
88       },
89       /* 2 */
90       {{           { 0x3041,0x3042,0x3043,0x0000                      }, 5 },
91        {    0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x9999,0x0000 }    },
92       },
93       /* 3 */
94       {{           { 0x3041,0x3042,0x3043,0x0000                      }, 3 },
95        {    0,0,0, { 0x3041,0x3042,0x3043,0x9999,0x9999,0x9999,0x0000 }    },
96       },
97       /* 4 */
98       {{           { 0x3041,0x3042,0x3043,0x0000                      }, 2 },
99        {    0,0,0, { 0x3041,0x3042,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
100       },
101       /* 5 */
102       {{           { 0x3041,0x3042,0x3043,0x0000                      }, 0 },
103        {    0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 }    },
104       },
105       /* 6 */
106       {{           { 0x0000,0x3042,0x3043,0x0000                      }, 3 },
107        {    0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 }    },
108       },
109       {is_last: 1}
110     }
111   },
112   {
113     {Twcsncpy, TST_LOC_end}
114   }
115 };