1 /*
2  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
3  *
4  *	 FILE:	dat_wcsncat.c
5  *
6  *	 WCSNCAT:  wchar_t *wcsncat (wchar_t *ws1, wchar_t *ws2, size_t n);
7  */
8 
9 
10 /*
11  *  Note:
12  *	  A terminating null wide character is always appended to
13  *	  the result: ws1.
14  *
15  */
16 
17 
18 TST_WCSNCAT tst_wcsncat_loc [] = {
19   {
20     {Twcsncat, TST_LOC_de},
21     {
22       /* 1 */
23       {
24 	/* Input: */
25 	{{ 0x00D1,0x00D2,0x0000	 },
26 	 {		    0x00D3,0x00D4,0x0000 }, 3 },
27 	/* Expect: */
28 	{   0,	0,    0,
29 	    { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 }    },
30       },
31       /* 2 */
32       {{{ 0x00D1,0x00D2,0x0000	},
33 	{		   0x00D3,0x00D4,0x0000 }, 2 },
34        {   0,    0,    0,
35 	   { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 }    },
36       },
37       /* 3 */
38       {{{ 0x00E1,0x00E2,0x0000	},
39 	{		   0x00E3,0x00E4,0x0000 }, 1 },
40        {   0,    0,    0,
41 	   { 0x00E1,0x00E2,0x00E3,0x0000	}    },
42       },
43       /* 4 */
44       {{{ 0x00E1,0x00E2,0x0000	},
45 	{		   0x00E3,0x00E4,0x0000 }, 0 },
46        {   0,    0,    0,
47 	   { 0x00E1,0x00E2,0x0000		}    },
48       },
49       /* 5 */
50       {{{ 0x0000		},
51 	{		   0x00D3,0x00D4,0x0000 }, 3 },
52        {   0,    0,    0,
53 	   {		   0x00D3,0x00D4,0x0000 }    },
54       },
55       /* 6 */
56       {{{ 0x00E1,0x00E2,0x0000	},
57 	{		   0x0000		}, 3 },
58        {   0,    0,    0,
59 	   { 0x00E1,0x00E2,0x0000		}    },
60       },
61       {.is_last = 1}
62     }
63   },
64   {
65     {Twcsncat, TST_LOC_enUS},
66     {
67       /* 1 */
68       {
69 	/* Input:  */
70 	{{ 0x0041,0x0042,0x0000	 },
71 	 {		    0x0043,0x0044,0x0000 }, 3 },
72 	/* Expect:  */
73 	{   0,	0,    0,
74 	    { 0x0041,0x0042,0x0043,0x0044,0x0000 }    },
75       },
76       /* 2 */
77       {{{ 0x0041,0x0042,0x0000	},
78 	{		   0x0043,0x0044,0x0000 }, 2 },
79        {   0,    0,    0,
80 	   { 0x0041,0x0042,0x0043,0x0044,0x0000 }    },
81       },
82       /* 3 */
83       {{{ 0x0051,0x0052,0x0000	},
84 	{		   0x0053,0x0054,0x0000 }, 1 },
85        {   0,    0,    0,
86 	   { 0x0051,0x0052,0x0053,0x0000	}    },
87       },
88       /* 4 */
89       {{{ 0x0051,0x0052,0x0000	},
90 	{		   0x0053,0x0054,0x0000 }, 0 },
91        {   0,    0,    0,
92 	   { 0x0051,0x0052,0x0000		}    },
93       },
94       /* 5 */
95       {{{ 0x0000		},
96 	{		   0x0043,0x0044,0x0000 }, 3 },
97        {   0,    0,    0,
98 	   {		   0x0043,0x0044,0x0000 }    },
99       },
100       /* 6 */
101       {{{ 0x0051,0x0052,0x0000	},
102 	{		   0x0000		}, 3 },
103        {   0,    0,    0,
104 	   { 0x0051,0x0052,0x0000		}    },
105       },
106       {.is_last = 1}
107     }
108   },
109   {
110     {Twcsncat, TST_LOC_eucJP},
111     {
112       /* 1 */
113       {{{ 0x3041,0x3042,0x0000	},
114 	{		   0x3043,0x3044,0x0000 }, 3 },
115        {   0,    0,    0,
116 	   { 0x3041,0x3042,0x3043,0x3044,0x0000 }    },
117       },
118       /* 2 */
119       {{{ 0x30A2,0x30A3,0x0000	},
120 	{		   0xFF71,0xFF72,0x0000 }, 2 },
121        {   0,    0,    0,
122 	   { 0x30A2,0x30A3,0xFF71,0xFF72,0x0000 }    },
123       },
124       /* 3 */
125       {{{ 0x3051,0x3052,0x0000	},
126 	{		   0x3053,0x3054,0x0000 }, 1 },
127        {   0,    0,    0,
128 	   { 0x3051,0x3052,0x3053,0x0000	}    },
129       },
130       /* 4 */
131       {{{ 0x3051,0x3052,0x0000	},
132 	{		   0x3053,0x3054,0x0000 }, 0 },
133        {   0,    0,    0,
134 	   { 0x3051,0x3052,0x0000		}    },
135       },
136       /* 5 */
137       {{{ 0x0000		},
138 	{		   0x3043,0x3044,0x0000 }, 3 },
139        {   0,    0,    0,
140 	   {		   0x3043,0x3044,0x0000 }    },
141       },
142       /* 6 */
143       {{{ 0x3051,0x3052,0x0000	},
144 	{		   0x0000		}, 3 },
145        {   0,    0,    0,
146 	   { 0x3051,0x3052,0x0000		}    },
147       },
148       {.is_last = 1}
149     }
150   },
151   {
152     {Twcsncat, TST_LOC_end}
153   }
154 };
155