2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
6 * WCSNCMP: int wcsncmp (const wchar_t *ws1, const wchar_t *ws2,
10 TST_WCSNCMP tst_wcsncmp_loc
[] = {
12 { Twcsncmp
, TST_LOC_de
},
14 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
15 { 0x00D1,0x00D2,0x00D3,0x0000 }, 4 }, /* #01 */
16 /*expect*/ { 0,1,0, },
18 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
19 { 0x00D1,0x00D2,0x00D3,0x0000 }, 3 }, /* #02 */
20 /*expect*/ { 0,1,0, },
22 { /*input.*/ { { 0x00D1,0x00D2,0x00D1,0x0000 },
23 { 0x00D1,0x00D2,0x00D3,0x0000 }, 2 }, /* #03 */
24 /*expect*/ { 0,1,0, },
26 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
27 { 0x00D0,0x00D2,0x00D3,0x0000 }, 0 }, /* #04 */
28 /*expect*/ { 0,1,0, },
30 { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
31 { 0x0000,0x00D2,0x00D1,0x0000 }, 3 }, /* #05 */
32 /*expect*/ { 0,1,0, },
34 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
35 { 0x0000,0x00D2,0x00D3,0x0000 }, 3 }, /* #06 */
36 /*expect*/ { 0,1,0x00D1, },
38 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
39 { 0x00D1,0x00D2,0x00D9,0x0000 }, 2 }, /* #07 */
40 /*expect*/ { 0,1,0, },
42 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
43 { 0x00D1,0x00D2,0x00D9,0x0000 }, 3 }, /* #08 */
44 /*expect*/ { 0,1,-0x0006, },
46 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
47 { 0x00D1,0x00D2,0x0000 }, 4 }, /* #09 */
48 /*expect*/ { 0,1,0x00D3, },
54 { Twcsncmp
, TST_LOC_enUS
},
56 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
57 { 0x0041,0x0042,0x0043,0x0000 }, 4 }, /* #01 */
58 /*expect*/ { 0,1,0, },
60 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
61 { 0x0041,0x0042,0x0043,0x0000 }, 3 }, /* #02 */
62 /*expect*/ { 0,1,0, },
64 { /*input.*/ { { 0x0041,0x0042,0x0041,0x0000 },
65 { 0x0041,0x0042,0x0043,0x0000 }, 2 }, /* #03 */
66 /*expect*/ { 0,1,0, },
68 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
69 { 0x0040,0x0042,0x0043,0x0000 }, 0 }, /* #04 */
70 /*expect*/ { 0,1,0, },
72 { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
73 { 0x0000,0x0042,0x0041,0x0000 }, 3 }, /* #05 */
74 /*expect*/ { 0,1,0, },
76 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
77 { 0x0000,0x0042,0x0043,0x0000 }, 3 }, /* #06 */
78 /*expect*/ { 0,1,0x0041, },
80 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
81 { 0x0041,0x0042,0x0049,0x0000 }, 2 }, /* #07 */
82 /*expect*/ { 0,1,0, },
84 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
85 { 0x0041,0x0042,0x0049,0x0000 }, 3 }, /* #08 */
86 /*expect*/ { 0,1,-0x0006, },
88 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
89 { 0x0041,0x0042,0x0000 }, 4 }, /* #09 */
90 /*expect*/ { 0,1,0x0043, },
96 { Twcsncmp
, TST_LOC_eucJP
},
98 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
99 { 0x3041,0x3042,0x3043,0x0000 }, 4 }, /* #01 */
100 /*expect*/ { 0,1,0, },
102 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
103 { 0x3041,0x3042,0x3043,0x0000 }, 3 }, /* #02 */
104 /*expect*/ { 0,1,0, },
106 { /*input.*/ { { 0x3041,0x3042,0x3041,0x0000 },
107 { 0x3041,0x3042,0x3043,0x0000 }, 2 }, /* #03 */
108 /*expect*/ { 0,1,0, },
110 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
111 { 0x3040,0x3042,0x3043,0x0000 }, 0 }, /* #04 */
112 /*expect*/ { 0,1,0, },
114 { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
115 { 0x0000,0x3042,0x3041,0x0000 }, 3 }, /* #05 */
116 /*expect*/ { 0,1,0, },
118 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
119 { 0x0000,0x3042,0x3043,0x0000 }, 3 }, /* #06 */
120 /*expect*/ { 0,1,0x3041, },
122 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
123 { 0x3041,0x3042,0x3049,0x0000 }, 2 }, /* #07 */
124 /*expect*/ { 0,1,0, },
126 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
127 { 0x3041,0x3042,0x3049,0x0000 }, 3 }, /* #08 */
128 /*expect*/ { 0,1,-0x0006, },
130 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
131 { 0x3041,0x3042,0x0000 }, 4 }, /* #09 */
132 /*expect*/ { 0,1,0x3043, },
138 { Twcsncmp
, TST_LOC_end
}