dnsapi: Build without -DWINE_NO_LONG_TYPES.
[wine.git] / dlls / dnsapi / tests / record.c
blob20738de3618e5821ff1620acad61b292779e8bc7
1 /*
2 * Tests for record handling functions
4 * Copyright 2006 Hans Leidekker
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
22 #include <stdio.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winnls.h"
27 #include "windns.h"
29 #include "wine/test.h"
31 static WCHAR name1[] = L"localhost";
32 static WCHAR name2[] = L"LOCALHOST";
34 static DNS_RECORDW r1 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } };
35 static DNS_RECORDW r2 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } };
36 static DNS_RECORDW r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } };
38 static void test_DnsRecordCompare( void )
40 ok( DnsRecordCompare( &r1, &r1 ) == TRUE, "failed unexpectedly\n" );
42 r2.pName = name2;
43 ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" );
45 r2.Flags.S.CharSet = DnsCharSetUnicode;
46 ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" );
48 r2.Flags.S.CharSet = DnsCharSetAnsi;
49 ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" );
51 r1.Flags.S.CharSet = DnsCharSetAnsi;
52 ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" );
54 r1.dwTtl = 0;
55 ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" );
57 r2.Data.A.IpAddress = 0;
58 ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" );
61 static void test_DnsRecordSetCompare( void )
63 DNS_RECORDW *diff1;
64 DNS_RECORDW *diff2;
65 DNS_RRSET rr1, rr2;
67 r1.Flags.DW = 0x2019;
68 r2.Flags.DW = 0x2019;
69 r2.Data.A.IpAddress = 0xffffffff;
71 DNS_RRSET_INIT( rr1 );
72 DNS_RRSET_INIT( rr2 );
74 DNS_RRSET_ADD( rr1, &r1 );
75 DNS_RRSET_ADD( rr2, &r2 );
77 DNS_RRSET_TERMINATE( rr1 );
78 DNS_RRSET_TERMINATE( rr2 );
80 ok( DnsRecordSetCompare( NULL, NULL, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" );
81 ok( DnsRecordSetCompare( rr1.pFirstRR, NULL, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" );
82 ok( DnsRecordSetCompare( NULL, rr2.pFirstRR, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" );
84 diff1 = NULL;
85 diff2 = NULL;
87 ok( DnsRecordSetCompare( NULL, NULL, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" );
88 ok( diff1 == NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 );
90 ok( DnsRecordSetCompare( rr1.pFirstRR, NULL, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" );
91 ok( diff1 != NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 );
92 DnsRecordListFree( diff1, DnsFreeRecordList );
94 ok( DnsRecordSetCompare( NULL, rr2.pFirstRR, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" );
95 ok( diff1 == NULL && diff2 != NULL, "unexpected result: %p, %p\n", diff1, diff2 );
96 DnsRecordListFree( diff2, DnsFreeRecordList );
98 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, NULL, &diff2 ) == TRUE, "failed unexpectedly\n" );
99 ok( diff2 == NULL, "unexpected result: %p\n", diff2 );
101 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, NULL ) == TRUE, "failed unexpectedly\n" );
102 ok( diff1 == NULL, "unexpected result: %p\n", diff1 );
104 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, &diff2 ) == TRUE, "failed unexpectedly\n" );
105 ok( diff1 == NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 );
107 r2.Data.A.IpAddress = 0;
109 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, NULL, &diff2 ) == FALSE, "succeeded unexpectedly\n" );
110 DnsRecordListFree( diff2, DnsFreeRecordList );
112 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, NULL ) == FALSE, "succeeded unexpectedly\n" );
113 DnsRecordListFree( diff1, DnsFreeRecordList );
115 ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" );
116 DnsRecordListFree( diff1, DnsFreeRecordList );
117 DnsRecordListFree( diff2, DnsFreeRecordList );
120 static void test_DnsRecordSetDetach( void )
122 DNS_RRSET rr;
123 DNS_RECORDW *r, *s;
125 DNS_RRSET_INIT( rr );
126 DNS_RRSET_ADD( rr, &r1 );
127 DNS_RRSET_ADD( rr, &r2 );
128 DNS_RRSET_ADD( rr, &r3 );
129 DNS_RRSET_TERMINATE( rr );
131 ok( !DnsRecordSetDetach( NULL ), "succeeded unexpectedly\n" );
133 r = rr.pFirstRR;
134 s = DnsRecordSetDetach( r );
136 ok( s == &r3, "failed unexpectedly: got %p, expected %p\n", s, &r3 );
137 ok( r == &r1, "failed unexpectedly: got %p, expected %p\n", r, &r1 );
138 ok( !r2.pNext, "failed unexpectedly\n" );
141 static BYTE msg_empty[] = /* empty message */
143 0x12, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
144 0x00
146 static BYTE msg_empty_answer[] = /* marked as answer but contains only question */
148 0x12, 0x34, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
149 0x00, 0x00, 0x01, 0x00, 0x01
151 static BYTE msg_question[] = /* question only */
153 0x12, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
154 0x00, 0x00, 0x01, 0x00, 0x01
156 static BYTE msg_winehq[] = /* valid answer for winehq.org */
158 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
159 0x06, 'w', 'i', 'n', 'e', 'h', 'q', 0x03, 'o', 'r', 'g', 0x00, 0x00, 0x01, 0x00, 0x01,
160 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x04, 0x04, 0x04, 0x51, 0x7c
162 static BYTE msg_invchars[] = /* invalid characters in name */
164 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
165 0x02, 'a', '$', 0x02, 'b', '\\', 0x02, 'c', '.', 0x02, 0x09, 'd', 0x00, 0x00, 0x01, 0x00, 0x01,
166 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x04, 0x51, 0x7c
168 static BYTE msg_root[] = /* root name */
170 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
171 0x00, 0x00, 0x01, 0x00, 0x01,
172 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x04, 0x51, 0x7c
174 static BYTE msg_label[] = /* name with binary label, not supported on Windows */
176 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
177 0x03, 'a', 'b', 'c', 0x41, 0x01, 0x34, 0x00, 0x00, 0x01, 0x00, 0x01,
178 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x04, 0x51, 0x7c
180 static BYTE msg_loop[] = /* name with loop */
182 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
183 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01,
184 0xc0, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x04, 0x51, 0x7c
186 static BYTE msg_types[] = /* various record types */
188 0x12, 0x34, 0x81, 0x80, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
189 0x06, 'w', 'i', 'n', 'e', 'h', 'q', 0x03, 'o', 'r', 'g', 0x00, 0x00, 0x01, 0x00, 0x01,
190 /* CNAME */ 0xc0, 0x0c, 0x00, 0x05, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x05, 0x01, 'a', 0x01, 'b', 0x00,
191 /* MX */ 0xc0, 0x0c, 0x00, 0x0f, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x07, 0x03, 0x04, 0x01, 'c', 0x01, 'd', 0x00,
192 /* AAAA */ 0xc0, 0x0c, 0x00, 0x1c, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00,
193 /* KEY */ 0xc0, 0x0c, 0x00, 0x19, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x06, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
194 /* TXT */ 0x01, 't', 0x01, 'x', 0x00, 0x00, 0x10, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x00, 0x09, 0x02, 'z', 'y', 0x00, 0x04, 'X', 'Y', 0xc3, 0xa9
197 static void test_DnsExtractRecordsFromMessage(void)
199 DNS_STATUS ret;
200 DNS_RECORDA *rec, *r;
201 DNS_RECORDW *recW, *rW;
203 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty, sizeof(msg_empty) - 1, &rec );
204 ok( ret == ERROR_INVALID_PARAMETER || broken(ret == DNS_ERROR_BAD_PACKET) /* win7 */,
205 "failed %ld\n", ret );
207 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty, sizeof(msg_empty), &rec );
208 ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
210 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty_answer, sizeof(msg_empty_answer), &rec );
211 ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
213 rec = (void *)0xdeadbeef;
214 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_question, sizeof(msg_question), &rec );
215 ok( !ret, "failed %ld\n", ret );
216 ok( !rec, "record %p\n", rec );
218 rec = (void *)0xdeadbeef;
219 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_winehq, sizeof(msg_winehq), &rec );
220 ok( !ret, "failed %ld\n", ret );
221 ok( rec != NULL, "record not set\n" );
222 ok( !strcmp( rec->pName, "winehq.org" ), "wrong name %s\n", rec->pName );
223 ok( rec->Flags.S.Section == DnsSectionAnswer, "wrong section %u\n", rec->Flags.S.Section );
224 ok( rec->Flags.S.CharSet == DnsCharSetUtf8, "wrong charset %u\n", rec->Flags.S.CharSet );
225 ok( rec->wType == DNS_TYPE_A, "wrong type %u\n", rec->wType );
226 ok( rec->wDataLength == sizeof(DNS_A_DATA), "wrong len %u\n", rec->wDataLength );
227 ok( rec->dwTtl == 0x04050607, "wrong ttl %#lx\n", rec->dwTtl );
228 ok( rec->Data.A.IpAddress == 0x7c510404, "wrong addr %#lx\n", rec->Data.A.IpAddress );
229 ok( !rec->pNext, "next record %p\n", rec->pNext );
230 DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
232 recW = (void *)0xdeadbeef;
233 ret = DnsExtractRecordsFromMessage_W( (DNS_MESSAGE_BUFFER *)msg_winehq, sizeof(msg_winehq), &recW );
234 ok( !ret, "failed %ld\n", ret );
235 ok( recW != NULL, "record not set\n" );
236 ok( !wcscmp( recW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(recW->pName) );
237 DnsRecordListFree( (DNS_RECORD *)recW, DnsFreeRecordList );
239 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_invchars, sizeof(msg_invchars), &rec );
240 ok( !ret, "failed %ld\n", ret );
241 ok( !strcmp( rec->pName, "a$.b\\.c..\td" ), "wrong name %s\n", rec->pName );
242 DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
244 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_root, sizeof(msg_root), &rec );
245 ok( !ret, "failed %ld\n", ret );
246 ok( !strcmp( rec->pName, "." ), "wrong name %s\n", rec->pName );
247 DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
249 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_label, sizeof(msg_label), &rec );
250 ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
252 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_loop, sizeof(msg_loop), &rec );
253 ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
255 ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_types, sizeof(msg_types), &rec );
256 ok( !ret, "failed %ld\n", ret );
257 r = rec;
258 ok( r != NULL, "record not set\n" );
259 ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
260 ok( r->wType == DNS_TYPE_CNAME, "wrong type %u\n", r->wType );
261 ok( !strcmp( r->Data.CNAME.pNameHost, "a.b" ), "wrong cname %s\n", r->Data.CNAME.pNameHost );
262 ok( r->wDataLength == sizeof(DNS_PTR_DATAA) + 4, "wrong len %x\n", r->wDataLength );
263 r = r->pNext;
264 ok( r != NULL, "record not set\n" );
265 ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
266 ok( r->wType == DNS_TYPE_MX, "wrong type %u\n", r->wType );
267 ok( r->Data.MX.wPreference == 0x0304, "wrong pref %x\n", r->Data.MX.wPreference );
268 ok( !strcmp( r->Data.MX.pNameExchange, "c.d" ), "wrong mx %s\n", r->Data.MX.pNameExchange );
269 ok( r->wDataLength == sizeof(DNS_MX_DATAA) + 4, "wrong len %x\n", r->wDataLength );
270 r = r->pNext;
271 ok( r != NULL, "record not set\n" );
272 ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
273 ok( r->wType == DNS_TYPE_AAAA, "wrong type %u\n", r->wType );
274 ok( r->Data.AAAA.Ip6Address.IP6Dword[0] == 0x04030201, "wrong addr %#lx\n",
275 r->Data.AAAA.Ip6Address.IP6Dword[0] );
276 ok( r->Data.AAAA.Ip6Address.IP6Dword[1] == 0x08070605, "wrong addr %#lx\n",
277 r->Data.AAAA.Ip6Address.IP6Dword[1] );
278 ok( r->Data.AAAA.Ip6Address.IP6Dword[2] == 0x0c0b0a09, "wrong addr %#lx\n",
279 r->Data.AAAA.Ip6Address.IP6Dword[2] );
280 ok( r->Data.AAAA.Ip6Address.IP6Dword[3] == 0x000f0e0d, "wrong addr %#lx\n",
281 r->Data.AAAA.Ip6Address.IP6Dword[3] );
282 ok( r->wDataLength == sizeof(DNS_AAAA_DATA), "wrong len %u\n", r->wDataLength );
283 r = r->pNext;
284 ok( r != NULL, "record not set\n" );
285 ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
286 ok( r->wType == DNS_TYPE_KEY, "wrong type %u\n", r->wType );
287 ok( r->Data.KEY.wFlags == 0x1122, "wrong flags %x\n", r->Data.KEY.wFlags );
288 ok( r->Data.KEY.chProtocol == 0x33, "wrong protocol %x\n", r->Data.KEY.chProtocol );
289 ok( r->Data.KEY.chAlgorithm == 0x44, "wrong algorithm %x\n", r->Data.KEY.chAlgorithm );
290 ok( r->Data.KEY.wKeyLength == 0x02, "wrong len %x\n", r->Data.KEY.wKeyLength );
291 ok( r->Data.KEY.Key[0] == 0x55, "wrong key %x\n", r->Data.KEY.Key[0] );
292 ok( r->Data.KEY.Key[1] == 0x66, "wrong key %x\n", r->Data.KEY.Key[1] );
293 ok( r->wDataLength == offsetof( DNS_KEY_DATA, Key[r->Data.KEY.wKeyLength] ),
294 "wrong len %x\n", r->wDataLength );
295 r = r->pNext;
296 ok( r != NULL, "record not set\n" );
297 ok( !strcmp( r->pName, "t.x" ), "wrong name %s\n", r->pName );
298 ok( r->wType == DNS_TYPE_TEXT, "wrong type %u\n", r->wType );
299 ok( r->Data.TXT.dwStringCount == 3, "wrong count %lu\n", r->Data.TXT.dwStringCount );
300 ok( !strcmp( r->Data.TXT.pStringArray[0], "zy" ), "wrong string %s\n", r->Data.TXT.pStringArray[0] );
301 ok( !strcmp( r->Data.TXT.pStringArray[1], "" ), "wrong string %s\n", r->Data.TXT.pStringArray[1] );
302 ok( !strcmp( r->Data.TXT.pStringArray[2], "XY\xc3\xa9" ), "wrong string %s\n", r->Data.TXT.pStringArray[2] );
303 ok( r->wDataLength == offsetof( DNS_TXT_DATAA, pStringArray[r->Data.TXT.dwStringCount] ),
304 "wrong len %x\n", r->wDataLength );
305 ok( !r->pNext, "next record %p\n", r->pNext );
306 DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
308 ret = DnsExtractRecordsFromMessage_W( (DNS_MESSAGE_BUFFER *)msg_types, sizeof(msg_types), &recW );
309 ok( !ret, "failed %ld\n", ret );
310 rW = recW;
311 ok( rW != NULL, "record not set\n" );
312 ok( !wcscmp( rW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(rW->pName) );
313 ok( rW->wType == DNS_TYPE_CNAME, "wrong type %u\n", rW->wType );
314 ok( !wcscmp( rW->Data.CNAME.pNameHost, L"a.b" ), "wrong cname %s\n", debugstr_w(rW->Data.CNAME.pNameHost) );
315 rW = rW->pNext;
316 ok( rW != NULL, "record not set\n" );
317 ok( !wcscmp( rW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(rW->pName) );
318 ok( rW->wType == DNS_TYPE_MX, "wrong type %u\n", rW->wType );
319 ok( !wcscmp( rW->Data.MX.pNameExchange, L"c.d" ), "wrong mx %s\n", debugstr_w(rW->Data.MX.pNameExchange) );
320 rW = rW->pNext;
321 ok( r != NULL, "record not set\n" );
322 ok( !wcscmp( rW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(rW->pName) );
323 ok( rW->wType == DNS_TYPE_AAAA, "wrong type %u\n", rW->wType );
324 rW = rW->pNext;
325 ok( r != NULL, "record not set\n" );
326 ok( !wcscmp( rW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(rW->pName) );
327 rW = rW->pNext;
328 ok( r != NULL, "record not set\n" );
329 ok( !wcscmp( rW->pName, L"t.x" ), "wrong name %s\n", debugstr_w(rW->pName) );
330 ok( rW->wType == DNS_TYPE_TEXT, "wrong type %u\n", rW->wType );
331 ok( rW->Data.TXT.dwStringCount == 3, "wrong count %lu\n", rW->Data.TXT.dwStringCount );
332 ok( !wcscmp( rW->Data.TXT.pStringArray[0], L"zy" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[0]) );
333 ok( !wcscmp( rW->Data.TXT.pStringArray[1], L"" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[1]) );
334 ok( !wcscmp( rW->Data.TXT.pStringArray[2], L"XY\x00e9" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[2]) );
335 ok( !rW->pNext, "next record %p\n", rW->pNext );
336 DnsRecordListFree( (DNS_RECORD *)recW, DnsFreeRecordList );
339 START_TEST(record)
341 test_DnsRecordCompare();
342 test_DnsRecordSetCompare();
343 test_DnsRecordSetDetach();
344 test_DnsExtractRecordsFromMessage();