Revert {send,sendm,recv,recvm}msg conformance changes
[glibc.git] / localedata / tests-mbwc / dat_wcsncat.c
blob8487033e6fa77a1969e92df2a55ababc27752358
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_wcsncat.c
6 * WCSNCAT: wchar_t *wcsncat (wchar_t *ws1, wchar_t *ws2, size_t n);
7 */
11 * Note:
12 * A terminating null wide character is always appended to
13 * the result: ws1.
18 TST_WCSNCAT tst_wcsncat_loc [] = {
20 {Twcsncat, TST_LOC_de},
22 /* 1 */
24 /* Input: */
25 {{ 0x00D1,0x00D2,0x0000 },
26 { 0x00D3,0x00D4,0x0000 }, 3 },
27 /* Expect: */
28 { 0, 0, 0,
29 { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 } },
31 /* 2 */
32 {{{ 0x00D1,0x00D2,0x0000 },
33 { 0x00D3,0x00D4,0x0000 }, 2 },
34 { 0, 0, 0,
35 { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 } },
37 /* 3 */
38 {{{ 0x00E1,0x00E2,0x0000 },
39 { 0x00E3,0x00E4,0x0000 }, 1 },
40 { 0, 0, 0,
41 { 0x00E1,0x00E2,0x00E3,0x0000 } },
43 /* 4 */
44 {{{ 0x00E1,0x00E2,0x0000 },
45 { 0x00E3,0x00E4,0x0000 }, 0 },
46 { 0, 0, 0,
47 { 0x00E1,0x00E2,0x0000 } },
49 /* 5 */
50 {{{ 0x0000 },
51 { 0x00D3,0x00D4,0x0000 }, 3 },
52 { 0, 0, 0,
53 { 0x00D3,0x00D4,0x0000 } },
55 /* 6 */
56 {{{ 0x00E1,0x00E2,0x0000 },
57 { 0x0000 }, 3 },
58 { 0, 0, 0,
59 { 0x00E1,0x00E2,0x0000 } },
61 {.is_last = 1}
65 {Twcsncat, TST_LOC_enUS},
67 /* 1 */
69 /* Input: */
70 {{ 0x0041,0x0042,0x0000 },
71 { 0x0043,0x0044,0x0000 }, 3 },
72 /* Expect: */
73 { 0, 0, 0,
74 { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
76 /* 2 */
77 {{{ 0x0041,0x0042,0x0000 },
78 { 0x0043,0x0044,0x0000 }, 2 },
79 { 0, 0, 0,
80 { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
82 /* 3 */
83 {{{ 0x0051,0x0052,0x0000 },
84 { 0x0053,0x0054,0x0000 }, 1 },
85 { 0, 0, 0,
86 { 0x0051,0x0052,0x0053,0x0000 } },
88 /* 4 */
89 {{{ 0x0051,0x0052,0x0000 },
90 { 0x0053,0x0054,0x0000 }, 0 },
91 { 0, 0, 0,
92 { 0x0051,0x0052,0x0000 } },
94 /* 5 */
95 {{{ 0x0000 },
96 { 0x0043,0x0044,0x0000 }, 3 },
97 { 0, 0, 0,
98 { 0x0043,0x0044,0x0000 } },
100 /* 6 */
101 {{{ 0x0051,0x0052,0x0000 },
102 { 0x0000 }, 3 },
103 { 0, 0, 0,
104 { 0x0051,0x0052,0x0000 } },
106 {.is_last = 1}
110 {Twcsncat, TST_LOC_eucJP},
112 /* 1 */
113 {{{ 0x3041,0x3042,0x0000 },
114 { 0x3043,0x3044,0x0000 }, 3 },
115 { 0, 0, 0,
116 { 0x3041,0x3042,0x3043,0x3044,0x0000 } },
118 /* 2 */
119 {{{ 0x30A2,0x30A3,0x0000 },
120 { 0xFF71,0xFF72,0x0000 }, 2 },
121 { 0, 0, 0,
122 { 0x30A2,0x30A3,0xFF71,0xFF72,0x0000 } },
124 /* 3 */
125 {{{ 0x3051,0x3052,0x0000 },
126 { 0x3053,0x3054,0x0000 }, 1 },
127 { 0, 0, 0,
128 { 0x3051,0x3052,0x3053,0x0000 } },
130 /* 4 */
131 {{{ 0x3051,0x3052,0x0000 },
132 { 0x3053,0x3054,0x0000 }, 0 },
133 { 0, 0, 0,
134 { 0x3051,0x3052,0x0000 } },
136 /* 5 */
137 {{{ 0x0000 },
138 { 0x3043,0x3044,0x0000 }, 3 },
139 { 0, 0, 0,
140 { 0x3043,0x3044,0x0000 } },
142 /* 6 */
143 {{{ 0x3051,0x3052,0x0000 },
144 { 0x0000 }, 3 },
145 { 0, 0, 0,
146 { 0x3051,0x3052,0x0000 } },
148 {.is_last = 1}
152 {Twcsncat, TST_LOC_end}