elf.h SHF_EXCLUDE signed int 31 bit shift triggers undefined behaviour.
[glibc.git] / localedata / tests-mbwc / dat_wcsncpy.c
blob38f34f13f73a3ecbcd034f6cbee38043f31fd2ec
1 /*
2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_wcsncpy.c
6 * WCSNCPY: wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2,
7 * size_t n);
8 */
11 /* Note:
13 * An initial value of ws1 in the test program is defined as:
15 * #define WCSNUM_NCPY 7
16 * wchar_t ws1 [WCSSIZE] = { 0x9999, 0x9999, 0x9999, 0x9999,
17 * 0x9999, 0x9999, 0x0000 };
18 * */
21 TST_WCSNCPY tst_wcsncpy_loc [] = {
23 {Twcsncpy, TST_LOC_de},
25 /* 1 */
26 {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 6 },
27 { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x0000,0x0000 } },
29 /* 2 */
30 {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 5 },
31 { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x9999,0x0000 } },
33 /* 3 */
34 {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 3 },
35 { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x9999,0x9999,0x9999,0x0000 } },
37 /* 4 */
38 {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 2 },
39 { 0,0,0, { 0x00D1,0x00D2,0x9999,0x9999,0x9999,0x9999,0x0000 } },
41 /* 5 */
42 {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 0 },
43 { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
45 /* 6 */
46 {{ { 0x0000,0x00D2,0x00D3,0x0000 }, 3 },
47 { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
49 {.is_last = 1}
53 {Twcsncpy, TST_LOC_enUS},
55 /* 1 */
56 {{ { 0x0041,0x0042,0x0043,0x0000 }, 6 },
57 { 0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x0000,0x0000 } },
59 /* 2 */
60 {{ { 0x0041,0x0042,0x0043,0x0000 }, 5 },
61 { 0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x9999,0x0000 } },
63 /* 3 */
64 {{ { 0x0041,0x0042,0x0043,0x0000 }, 3 },
65 { 0,0,0, { 0x0041,0x0042,0x0043,0x9999,0x9999,0x9999,0x0000 } },
67 /* 4 */
68 {{ { 0x0041,0x0042,0x0043,0x0000 }, 2 },
69 { 0,0,0, { 0x0041,0x0042,0x9999,0x9999,0x9999,0x9999,0x0000 } },
71 /* 5 */
72 {{ { 0x0041,0x0042,0x0043,0x0000 }, 0 },
73 { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
75 /* 6 */
76 {{ { 0x0000,0x0042,0x0043,0x0000 }, 3 },
77 { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
79 {.is_last = 1}
83 {Twcsncpy, TST_LOC_eucJP},
85 /* 1 */
86 {{ { 0x3041,0x3042,0x3043,0x0000 }, 6 },
87 { 0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x0000,0x0000 } },
89 /* 2 */
90 {{ { 0x3041,0x3042,0x3043,0x0000 }, 5 },
91 { 0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x9999,0x0000 } },
93 /* 3 */
94 {{ { 0x3041,0x3042,0x3043,0x0000 }, 3 },
95 { 0,0,0, { 0x3041,0x3042,0x3043,0x9999,0x9999,0x9999,0x0000 } },
97 /* 4 */
98 {{ { 0x3041,0x3042,0x3043,0x0000 }, 2 },
99 { 0,0,0, { 0x3041,0x3042,0x9999,0x9999,0x9999,0x9999,0x0000 } },
101 /* 5 */
102 {{ { 0x3041,0x3042,0x3043,0x0000 }, 0 },
103 { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
105 /* 6 */
106 {{ { 0x0000,0x3042,0x3043,0x0000 }, 3 },
107 { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
109 {.is_last = 1}
113 {Twcsncpy, TST_LOC_end}