1 /*
2  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
3  *
4  *	 FILE:	dat_wcsncmp.c
5  *
6  *	 WCSNCMP:  int wcsncmp (const wchar_t *ws1, const wchar_t *ws2,
7  *				size_t n);
8  */
9 
10 TST_WCSNCMP tst_wcsncmp_loc [] = {
11   {
12     { Twcsncmp, TST_LOC_de },
13     {
14       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
15 		     { 0x00D1,0x00D2,0x00D3,0x0000 }, 4 },  /* #01 */
16 	/*expect*/ { 0,1,0,				},
17       },
18       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
19 		     { 0x00D1,0x00D2,0x00D3,0x0000 }, 3 },  /* #02 */
20 	/*expect*/ { 0,1,0,				},
21       },
22       { /*input.*/ { { 0x00D1,0x00D2,0x00D1,0x0000 },
23 		     { 0x00D1,0x00D2,0x00D3,0x0000 }, 2 },  /* #03 */
24 	/*expect*/ { 0,1,0,				},
25       },
26       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
27 		     { 0x00D0,0x00D2,0x00D3,0x0000 }, 0 },  /* #04 */
28 	/*expect*/ { 0,1,0,				},
29       },
30       { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
31 		     { 0x0000,0x00D2,0x00D1,0x0000 }, 3 },  /* #05 */
32 	/*expect*/ { 0,1,0,				},
33       },
34       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
35 		     { 0x0000,0x00D2,0x00D3,0x0000 }, 3 },  /* #06 */
36 	/*expect*/ { 0,1,1,			},
37       },
38       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
39 		     { 0x00D1,0x00D2,0x00D9,0x0000 }, 2 },  /* #07 */
40 	/*expect*/ { 0,1,0,				},
41       },
42       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
43 		     { 0x00D1,0x00D2,0x00D9,0x0000 }, 3 },  /* #08 */
44 	/*expect*/ { 0,1,-1,			},
45       },
46       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
47 		     { 0x00D1,0x00D2,0x0000	   }, 4 },  /* #09 */
48 	/*expect*/ { 0,1,1,			},
49       },
50       { .is_last = 1 }
51     }
52   },
53   {
54     { Twcsncmp, TST_LOC_enUS },
55     {
56       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
57 		     { 0x0041,0x0042,0x0043,0x0000 }, 4 },  /* #01 */
58 	/*expect*/ { 0,1,0,				},
59       },
60       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
61 		     { 0x0041,0x0042,0x0043,0x0000 }, 3 },  /* #02 */
62 	/*expect*/ { 0,1,0,				},
63       },
64       { /*input.*/ { { 0x0041,0x0042,0x0041,0x0000 },
65 		     { 0x0041,0x0042,0x0043,0x0000 }, 2 },  /* #03 */
66 	/*expect*/ { 0,1,0,				},
67       },
68       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
69 		     { 0x0040,0x0042,0x0043,0x0000 }, 0 },  /* #04 */
70 	/*expect*/ { 0,1,0,				},
71       },
72       { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
73 		     { 0x0000,0x0042,0x0041,0x0000 }, 3 },  /* #05 */
74 	/*expect*/ { 0,1,0,				},
75       },
76       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
77 		     { 0x0000,0x0042,0x0043,0x0000 }, 3 },  /* #06 */
78 	/*expect*/ { 0,1,1,			},
79       },
80       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
81 		     { 0x0041,0x0042,0x0049,0x0000 }, 2 },  /* #07 */
82 	/*expect*/ { 0,1,0,				},
83       },
84       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
85 		     { 0x0041,0x0042,0x0049,0x0000 }, 3 },  /* #08 */
86 	/*expect*/ { 0,1,-1,			},
87       },
88       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
89 		     { 0x0041,0x0042,0x0000	   }, 4 },  /* #09 */
90 	/*expect*/ { 0,1,1,			},
91       },
92       { .is_last = 1 }
93     }
94   },
95   {
96     { Twcsncmp, TST_LOC_eucJP },
97     {
98       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
99 		     { 0x3041,0x3042,0x3043,0x0000 }, 4 },  /* #01 */
100 	/*expect*/ { 0,1,0,				},
101       },
102       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
103 		     { 0x3041,0x3042,0x3043,0x0000 }, 3 },  /* #02 */
104 	/*expect*/ { 0,1,0,				},
105       },
106       { /*input.*/ { { 0x3041,0x3042,0x3041,0x0000 },
107 		     { 0x3041,0x3042,0x3043,0x0000 }, 2 },  /* #03 */
108 	/*expect*/ { 0,1,0,				},
109       },
110       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
111 		     { 0x3040,0x3042,0x3043,0x0000 }, 0 },  /* #04 */
112 	/*expect*/ { 0,1,0,				},
113       },
114       { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
115 		     { 0x0000,0x3042,0x3041,0x0000 }, 3 },  /* #05 */
116 	/*expect*/ { 0,1,0,				},
117       },
118       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
119 		     { 0x0000,0x3042,0x3043,0x0000 }, 3 },  /* #06 */
120 	/*expect*/ { 0,1,1,			},
121       },
122       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
123 		     { 0x3041,0x3042,0x3049,0x0000 }, 2 },  /* #07 */
124 	/*expect*/ { 0,1,0,				},
125       },
126       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
127 		     { 0x3041,0x3042,0x3049,0x0000 }, 3 },  /* #08 */
128 	/*expect*/ { 0,1,-1,			},
129       },
130       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
131 		     { 0x3041,0x3042,0x0000	   }, 4 },  /* #09 */
132 	/*expect*/ { 0,1,1,			},
133       },
134       { .is_last = 1 }
135     }
136   },
137   {
138     { Twcsncmp, TST_LOC_end }
139   }
140 };
141