ReactOS 0.4.16-dev-250-g3ecd236
DelNode.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API tests
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Test for advpack.dll DelNode function
5 * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7#include <apitest.h>
8
9#include <windef.h>
10#include <stdio.h>
11
12/* Flags for DelNode */
13#define ADN_DEL_IF_EMPTY 0x00000001
14#define ADN_DONT_DEL_SUBDIRS 0x00000002
15#define ADN_DONT_DEL_DIR 0x00000004
16#define ADN_DEL_UNC_PATHS 0x00000008
17
18/* DelNodeA and DelNodeW in advpack.dll */
21
25
26typedef struct
27{
28 const char *item;
30} NODEA;
31
32static const NODEA s_nodesA[] =
33{
34 { "dir1", TRUE }, /* 0 */
35 { "dir1\\dir2", TRUE }, /* 1 */
36 { "dir1\\dir2\\file1", FALSE }, /* 2 */
37};
38
39typedef struct
40{
41 const WCHAR *item;
43} NODEW;
44
45static const NODEW s_nodesW[] =
46{
47 { L"dir1", TRUE }, /* 0 */
48 { L"dir1\\dir2", TRUE }, /* 1 */
49 { L"dir1\\dir2\\file1", FALSE }, /* 2 */
50};
51
52typedef enum
53{
60
61typedef struct
62{
68} ENTRY;
69
70/* TODO: ADN_DEL_UNC_PATHS */
71#define FLAGS0 0
72#define FLAGS1 ADN_DEL_IF_EMPTY
73#define FLAGS2 ADN_DONT_DEL_DIR
74#define FLAGS3 ADN_DONT_DEL_SUBDIRS
75#define FLAGS4 (ADN_DONT_DEL_DIR | ADN_DONT_DEL_SUBDIRS)
76#define FLAGS5 (ADN_DEL_IF_EMPTY | ADN_DONT_DEL_DIR)
77#define FLAGS6 (ADN_DEL_IF_EMPTY | ADN_DONT_DEL_SUBDIRS)
78#define FLAGS7 (ADN_DEL_IF_EMPTY | ADN_DONT_DEL_DIR | ADN_DONT_DEL_SUBDIRS)
79#define FLAGS8 0xFFFFFFFF
80
81/* The test entries */
82static const ENTRY s_entries[] =
83{
84 { __LINE__, 0, EAT_CREATE },
85 { __LINE__, 1, EAT_CREATE },
86 { __LINE__, 1, EAT_DELETE },
87 { __LINE__, 0, EAT_DELETE },
88
89 { __LINE__, 0, EAT_CREATE },
90 { __LINE__, 1, EAT_CREATE },
91 { __LINE__, 0, EAT_CALL, FLAGS0, S_OK },
92 { __LINE__, 0, EAT_CHECK_NON_EXIST },
93
94 { __LINE__, 0, EAT_CREATE },
95 { __LINE__, 1, EAT_CREATE },
96 { __LINE__, 0, EAT_CALL, FLAGS1, E_FAIL },
97 { __LINE__, 0, EAT_CHECK_EXIST },
98
99 { __LINE__, 0, EAT_CREATE },
100 { __LINE__, 1, EAT_CREATE },
101 { __LINE__, 0, EAT_CALL, FLAGS2, S_OK },
102 { __LINE__, 0, EAT_CHECK_EXIST },
103
104 { __LINE__, 0, EAT_CREATE },
105 { __LINE__, 1, EAT_CREATE },
106 { __LINE__, 0, EAT_CALL, FLAGS3, S_OK },
107 { __LINE__, 0, EAT_CHECK_EXIST },
108
109 { __LINE__, 0, EAT_CREATE },
110 { __LINE__, 1, EAT_CREATE },
111 { __LINE__, 0, EAT_CALL, FLAGS4, S_OK },
112 { __LINE__, 0, EAT_CHECK_EXIST },
113
114 { __LINE__, 0, EAT_CREATE },
115 { __LINE__, 1, EAT_CREATE },
116 { __LINE__, 0, EAT_CALL, FLAGS5, E_FAIL },
117 { __LINE__, 0, EAT_CHECK_EXIST },
118
119 { __LINE__, 0, EAT_CREATE },
120 { __LINE__, 1, EAT_CREATE },
121 { __LINE__, 0, EAT_CALL, FLAGS6, E_FAIL },
122 { __LINE__, 0, EAT_CHECK_EXIST },
123
124 { __LINE__, 0, EAT_CREATE },
125 { __LINE__, 1, EAT_CREATE },
126 { __LINE__, 0, EAT_CALL, FLAGS7, E_FAIL },
127 { __LINE__, 0, EAT_CHECK_EXIST },
128
129 { __LINE__, 0, EAT_CREATE },
130 { __LINE__, 1, EAT_CREATE },
131 { __LINE__, 0, EAT_CALL, FLAGS8, E_FAIL },
132 { __LINE__, 0, EAT_CHECK_EXIST },
133
134 { __LINE__, 0, EAT_CREATE },
135 { __LINE__, 1, EAT_CREATE },
136 { __LINE__, 2, EAT_CREATE },
137 { __LINE__, 0, EAT_CALL, FLAGS0, S_OK },
138 { __LINE__, 0, EAT_CHECK_NON_EXIST },
139
140 { __LINE__, 0, EAT_CREATE },
141 { __LINE__, 1, EAT_CREATE },
142 { __LINE__, 2, EAT_CREATE },
143 { __LINE__, 0, EAT_CALL, FLAGS1, E_FAIL },
144 { __LINE__, 0, EAT_CHECK_EXIST },
145 { __LINE__, 1, EAT_CHECK_EXIST },
146 { __LINE__, 2, EAT_CHECK_EXIST },
147
148 { __LINE__, 0, EAT_CREATE },
149 { __LINE__, 1, EAT_CREATE },
150 { __LINE__, 2, EAT_CREATE },
151 { __LINE__, 0, EAT_CALL, FLAGS2, S_OK },
152 { __LINE__, 0, EAT_CHECK_EXIST },
153 { __LINE__, 1, EAT_CHECK_NON_EXIST },
154 { __LINE__, 2, EAT_CHECK_NON_EXIST },
155
156 { __LINE__, 0, EAT_CREATE },
157 { __LINE__, 1, EAT_CREATE },
158 { __LINE__, 2, EAT_CREATE },
159 { __LINE__, 0, EAT_CALL, FLAGS3, S_OK },
160 { __LINE__, 0, EAT_CHECK_EXIST },
161 { __LINE__, 1, EAT_CHECK_EXIST },
162 { __LINE__, 2, EAT_CHECK_EXIST },
163
164 { __LINE__, 0, EAT_CREATE },
165 { __LINE__, 1, EAT_CREATE },
166 { __LINE__, 2, EAT_CREATE },
167 { __LINE__, 0, EAT_CALL, FLAGS4, S_OK },
168 { __LINE__, 0, EAT_CHECK_EXIST },
169 { __LINE__, 1, EAT_CHECK_EXIST },
170 { __LINE__, 2, EAT_CHECK_EXIST },
171
172 { __LINE__, 0, EAT_CREATE },
173 { __LINE__, 1, EAT_CREATE },
174 { __LINE__, 2, EAT_CREATE },
175 { __LINE__, 0, EAT_CALL, FLAGS5, E_FAIL },
176 { __LINE__, 0, EAT_CHECK_EXIST },
177 { __LINE__, 1, EAT_CHECK_EXIST },
178 { __LINE__, 2, EAT_CHECK_EXIST },
179
180 { __LINE__, 0, EAT_CREATE },
181 { __LINE__, 1, EAT_CREATE },
182 { __LINE__, 2, EAT_CREATE },
183 { __LINE__, 0, EAT_CALL, FLAGS6, E_FAIL },
184 { __LINE__, 0, EAT_CHECK_EXIST },
185 { __LINE__, 1, EAT_CHECK_EXIST },
186 { __LINE__, 2, EAT_CHECK_EXIST },
187
188 { __LINE__, 0, EAT_CREATE },
189 { __LINE__, 1, EAT_CREATE },
190 { __LINE__, 2, EAT_CREATE },
191 { __LINE__, 0, EAT_CALL, FLAGS7, E_FAIL },
192 { __LINE__, 0, EAT_CHECK_EXIST },
193 { __LINE__, 1, EAT_CHECK_EXIST },
194 { __LINE__, 2, EAT_CHECK_EXIST },
195
196 { __LINE__, 0, EAT_CREATE },
197 { __LINE__, 1, EAT_CREATE },
198 { __LINE__, 2, EAT_CREATE },
199 { __LINE__, 0, EAT_CALL, FLAGS8, E_FAIL },
200 { __LINE__, 0, EAT_CHECK_EXIST },
201 { __LINE__, 1, EAT_CHECK_EXIST },
202 { __LINE__, 2, EAT_CHECK_EXIST },
203
204 { __LINE__, 1, EAT_CREATE },
205 { __LINE__, 2, EAT_CREATE },
206 { __LINE__, 1, EAT_CALL, FLAGS0, S_OK },
207 { __LINE__, 1, EAT_CHECK_NON_EXIST },
208
209 { __LINE__, 1, EAT_CREATE },
210 { __LINE__, 2, EAT_CREATE },
211 { __LINE__, 1, EAT_CALL, FLAGS1, E_FAIL },
212 { __LINE__, 1, EAT_CHECK_EXIST },
213 { __LINE__, 2, EAT_CHECK_EXIST },
214
215 { __LINE__, 1, EAT_CREATE },
216 { __LINE__, 2, EAT_CREATE },
217 { __LINE__, 1, EAT_CALL, FLAGS2, S_OK },
218 { __LINE__, 1, EAT_CHECK_EXIST },
219 { __LINE__, 2, EAT_CHECK_NON_EXIST },
220
221 { __LINE__, 1, EAT_CREATE },
222 { __LINE__, 2, EAT_CREATE },
223 { __LINE__, 1, EAT_CALL, FLAGS3, S_OK },
224 { __LINE__, 1, EAT_CHECK_NON_EXIST },
225
226 { __LINE__, 1, EAT_CREATE },
227 { __LINE__, 2, EAT_CREATE },
228 { __LINE__, 1, EAT_CALL, FLAGS4, S_OK },
229 { __LINE__, 1, EAT_CHECK_EXIST },
230 { __LINE__, 2, EAT_CHECK_NON_EXIST },
231
232 { __LINE__, 1, EAT_CREATE },
233 { __LINE__, 2, EAT_CREATE },
234 { __LINE__, 1, EAT_CALL, FLAGS5, E_FAIL },
235 { __LINE__, 1, EAT_CHECK_EXIST },
236 { __LINE__, 2, EAT_CHECK_EXIST },
237
238 { __LINE__, 1, EAT_CREATE },
239 { __LINE__, 2, EAT_CREATE },
240 { __LINE__, 1, EAT_CALL, FLAGS6, E_FAIL },
241 { __LINE__, 1, EAT_CHECK_EXIST },
242 { __LINE__, 2, EAT_CHECK_EXIST },
243
244 { __LINE__, 1, EAT_CREATE },
245 { __LINE__, 2, EAT_CREATE },
246 { __LINE__, 1, EAT_CALL, FLAGS7, E_FAIL },
247 { __LINE__, 1, EAT_CHECK_EXIST },
248 { __LINE__, 2, EAT_CHECK_EXIST },
249
250 { __LINE__, 1, EAT_CREATE },
251 { __LINE__, 2, EAT_CREATE },
252 { __LINE__, 1, EAT_CALL, FLAGS8, E_FAIL },
253 { __LINE__, 1, EAT_CHECK_EXIST },
254 { __LINE__, 2, EAT_CHECK_EXIST },
255
256 { __LINE__, 2, EAT_DELETE },
257
258 { __LINE__, 1, EAT_CREATE },
259 { __LINE__, 1, EAT_CALL, FLAGS0, S_OK },
260 { __LINE__, 1, EAT_CHECK_NON_EXIST },
261
262 { __LINE__, 1, EAT_CREATE },
263 { __LINE__, 1, EAT_CALL, FLAGS1, S_OK },
264 { __LINE__, 1, EAT_CHECK_NON_EXIST },
265
266 { __LINE__, 1, EAT_CREATE },
267 { __LINE__, 1, EAT_CALL, FLAGS2, S_OK },
268 { __LINE__, 1, EAT_CHECK_EXIST },
269
270 { __LINE__, 1, EAT_CREATE },
271 { __LINE__, 1, EAT_CALL, FLAGS3, S_OK },
272 { __LINE__, 1, EAT_CHECK_NON_EXIST },
273
274 { __LINE__, 1, EAT_CREATE },
275 { __LINE__, 1, EAT_CALL, FLAGS4, S_OK },
276 { __LINE__, 1, EAT_CHECK_EXIST },
277
278 { __LINE__, 1, EAT_CREATE },
279 { __LINE__, 1, EAT_CALL, FLAGS5, S_OK },
280 { __LINE__, 1, EAT_CHECK_NON_EXIST },
281
282 { __LINE__, 1, EAT_CREATE },
283 { __LINE__, 1, EAT_CALL, FLAGS6, S_OK },
284 { __LINE__, 1, EAT_CHECK_NON_EXIST },
285
286 { __LINE__, 1, EAT_CREATE },
287 { __LINE__, 1, EAT_CALL, FLAGS7, S_OK },
288 { __LINE__, 1, EAT_CHECK_NON_EXIST },
289
290 { __LINE__, 1, EAT_CREATE },
291 { __LINE__, 1, EAT_CALL, FLAGS8, S_OK },
292 { __LINE__, 1, EAT_CHECK_NON_EXIST },
293
294 { __LINE__, 1, EAT_CREATE },
295
296 { __LINE__, 2, EAT_CREATE },
297 { __LINE__, 2, EAT_CALL, FLAGS0, S_OK },
298 { __LINE__, 2, EAT_CHECK_NON_EXIST },
299
300 { __LINE__, 2, EAT_CREATE },
301 { __LINE__, 2, EAT_CALL, FLAGS1, S_OK },
302 { __LINE__, 2, EAT_CHECK_NON_EXIST },
303
304 { __LINE__, 2, EAT_CREATE },
305 { __LINE__, 2, EAT_CALL, FLAGS2, S_OK },
306 { __LINE__, 2, EAT_CHECK_NON_EXIST },
307
308 { __LINE__, 2, EAT_CREATE },
309 { __LINE__, 2, EAT_CALL, FLAGS3, S_OK },
310 { __LINE__, 2, EAT_CHECK_NON_EXIST },
311
312 { __LINE__, 2, EAT_CREATE },
313 { __LINE__, 2, EAT_CALL, FLAGS4, S_OK },
314 { __LINE__, 2, EAT_CHECK_NON_EXIST },
315
316 { __LINE__, 2, EAT_CREATE },
317 { __LINE__, 2, EAT_CALL, FLAGS5, S_OK },
318 { __LINE__, 2, EAT_CHECK_NON_EXIST },
319
320 { __LINE__, 2, EAT_CREATE },
321 { __LINE__, 2, EAT_CALL, FLAGS6, S_OK },
322 { __LINE__, 2, EAT_CHECK_NON_EXIST },
323
324 { __LINE__, 2, EAT_CREATE },
325 { __LINE__, 2, EAT_CALL, FLAGS7, S_OK },
326 { __LINE__, 2, EAT_CHECK_NON_EXIST },
327
328 { __LINE__, 2, EAT_CREATE },
329 { __LINE__, 2, EAT_CALL, FLAGS8, S_OK },
330 { __LINE__, 2, EAT_CHECK_NON_EXIST },
331
332 { __LINE__, 2, EAT_DELETE },
333 { __LINE__, 1, EAT_DELETE },
334 { __LINE__, 0, EAT_DELETE },
335
336 { __LINE__, 2, EAT_CALL, FLAGS0, E_FAIL },
337 { __LINE__, 2, EAT_CALL, FLAGS1, E_FAIL },
338 { __LINE__, 2, EAT_CALL, FLAGS2, E_FAIL },
339 { __LINE__, 2, EAT_CALL, FLAGS3, E_FAIL },
340 { __LINE__, 2, EAT_CALL, FLAGS4, E_FAIL },
341 { __LINE__, 2, EAT_CALL, FLAGS5, E_FAIL },
342 { __LINE__, 2, EAT_CALL, FLAGS6, E_FAIL },
343 { __LINE__, 2, EAT_CALL, FLAGS7, E_FAIL },
344 { __LINE__, 2, EAT_CALL, FLAGS8, E_FAIL },
345
346 { __LINE__, 1, EAT_CALL, FLAGS0, E_FAIL },
347 { __LINE__, 1, EAT_CALL, FLAGS1, E_FAIL },
348 { __LINE__, 1, EAT_CALL, FLAGS2, E_FAIL },
349 { __LINE__, 1, EAT_CALL, FLAGS3, E_FAIL },
350 { __LINE__, 1, EAT_CALL, FLAGS4, E_FAIL },
351 { __LINE__, 1, EAT_CALL, FLAGS5, E_FAIL },
352 { __LINE__, 1, EAT_CALL, FLAGS6, E_FAIL },
353 { __LINE__, 1, EAT_CALL, FLAGS7, E_FAIL },
354 { __LINE__, 1, EAT_CALL, FLAGS8, E_FAIL },
355};
356
357static char s_cur_dir_A[MAX_PATH] = "";
359
360static char *GetPathA(const char *item)
361{
362 static char s_path[MAX_PATH];
363 lstrcpyA(s_path, s_cur_dir_A);
364 lstrcatA(s_path, "\\");
365 lstrcatA(s_path, item);
366 return s_path;
367}
368
369static WCHAR *GetPathW(const WCHAR *item)
370{
371 static WCHAR s_path[MAX_PATH];
372 lstrcpyW(s_path, s_cur_dir_W);
373 lstrcatW(s_path, L"\\");
374 lstrcatW(s_path, item);
375 return s_path;
376}
377
378static void cleanupA(void)
379{
380 size_t i, k;
381 for (k = 0; k < 4; ++k)
382 {
383 for (i = 0; i < _countof(s_nodesA); ++i)
384 {
385 const NODEA *node = &s_nodesA[i];
386 char *path = GetPathA(node->item);
387
390 }
391 }
392}
393
394static void Test_DelNodeA(void)
395{
396 DWORD attr;
397 size_t i;
398
400 {
401 skip("GetCurrentDirectoryA failed\n");
402 return;
403 }
404
405 cleanupA();
406
407 for (i = 0; i < _countof(s_entries); ++i)
408 {
409 const ENTRY *entry = &s_entries[i];
410 INT lineno = entry->lineno;
411 const NODEA *node = &s_nodesA[entry->node];
412 char *path = GetPathA(node->item);
413 INT ret;
414
415 switch (entry->action_type)
416 {
417 case EAT_CREATE:
418 if (node->is_dir)
419 {
421
423 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: path:%s, attr:0x%08lX\n", lineno, path, attr);
424 ok((attr & FILE_ATTRIBUTE_DIRECTORY), "Line %d: path:%s, attr:0x%08lX\n", lineno, path, attr);
425 }
426 else
427 {
428 fclose(fopen(path, "w"));
429
431 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
432 ok(!(attr & FILE_ATTRIBUTE_DIRECTORY), "Line %d: attr was 0x%08lX\n", lineno, attr);
433 }
434 break;
435 case EAT_DELETE:
436 if (node->is_dir)
437 {
439 }
440 else
441 {
443 }
445 ok(attr == INVALID_FILE_ATTRIBUTES, "Line %d: cannot delete\n", lineno);
446 break;
447 case EAT_CHECK_EXIST:
449 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
450 break;
453 ok(attr == INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
454 break;
455 case EAT_CALL:
456 ret = (*s_pDelNodeA)(path, entry->flags);
457 ok(ret == entry->ret, "Line %d: ret:%d, path:%s, flags:0x%08lX\n",
458 lineno, ret, path, entry->flags);
459 break;
460 }
461 }
462
463 cleanupA();
464}
465
466static void cleanupW(void)
467{
468 size_t i, k;
469 for (k = 0; k < 4; ++k)
470 {
471 for (i = 0; i < _countof(s_nodesW); ++i)
472 {
473 const NODEW *node = &s_nodesW[i];
474 WCHAR *path = GetPathW(node->item);
475
478 }
479 }
480}
481
482static void Test_DelNodeW(void)
483{
484 DWORD attr;
485 size_t i;
486
488 {
489 skip("GetCurrentDirectoryA failed\n");
490 return;
491 }
492
493 cleanupW();
494
495 for (i = 0; i < _countof(s_entries); ++i)
496 {
497 const ENTRY *entry = &s_entries[i];
498 INT lineno = entry->lineno;
499 const NODEW *node = &s_nodesW[entry->node];
500 WCHAR *path = GetPathW(node->item);
501 INT ret;
502
503 switch (entry->action_type)
504 {
505 case EAT_CREATE:
506 if (node->is_dir)
507 {
509
511 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: path:%S, attr:0x%08lX\n", lineno, path, attr);
512 ok((attr & FILE_ATTRIBUTE_DIRECTORY), "Line %d: path:%S, attr:0x%08lX\n", lineno, path, attr);
513 }
514 else
515 {
516 fclose(_wfopen(path, L"w"));
517
519 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
520 ok(!(attr & FILE_ATTRIBUTE_DIRECTORY), "Line %d: attr was 0x%08lX\n", lineno, attr);
521 }
522 break;
523 case EAT_DELETE:
524 if (node->is_dir)
525 {
527 }
528 else
529 {
531 }
533 ok(attr == INVALID_FILE_ATTRIBUTES, "Line %d: cannot delete\n", lineno);
534 break;
535 case EAT_CHECK_EXIST:
537 ok(attr != INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
538 break;
541 ok(attr == INVALID_FILE_ATTRIBUTES, "Line %d: attr was 0x%08lX\n", lineno, attr);
542 break;
543 case EAT_CALL:
544 ret = (*s_pDelNodeW)(path, entry->flags);
545 ok(ret == entry->ret, "Line %d: ret:%d, path:%S, flags:0x%08lX\n",
546 lineno, ret, path, entry->flags);
547 break;
548 }
549 }
550
551 cleanupW();
552}
553
555{
556 s_hAdvPack = LoadLibraryA("advpack.dll");
557 if (s_hAdvPack == NULL)
558 {
559 skip("unable to load advpack.dll\n");
560 return;
561 }
562
563 /* DelNodeA */
565 if (s_pDelNodeA)
566 {
568 }
569 else
570 {
571 skip("DelNodeA not found in advpack.dll\n");
572 }
573
574 /* DelNodeW */
576 if (s_pDelNodeW)
577 {
579 }
580 else
581 {
582 skip("DelNodeW not found in advpack.dll\n");
583 }
584
587}
#define FLAGS8
Definition: DelNode.c:79
ENTRY_ACTION_TYPE
Definition: DelNode.c:53
@ EAT_CALL
Definition: DelNode.c:58
@ EAT_CREATE
Definition: DelNode.c:54
@ EAT_CHECK_EXIST
Definition: DelNode.c:56
@ EAT_DELETE
Definition: DelNode.c:55
@ EAT_CHECK_NON_EXIST
Definition: DelNode.c:57
static const NODEW s_nodesW[]
Definition: DelNode.c:45
static const NODEA s_nodesA[]
Definition: DelNode.c:32
static DELNODEW s_pDelNodeW
Definition: DelNode.c:24
static HINSTANCE s_hAdvPack
Definition: DelNode.c:22
static char * GetPathA(const char *item)
Definition: DelNode.c:360
#define FLAGS5
Definition: DelNode.c:76
#define FLAGS4
Definition: DelNode.c:75
#define FLAGS7
Definition: DelNode.c:78
#define FLAGS0
Definition: DelNode.c:71
static const ENTRY s_entries[]
Definition: DelNode.c:82
static void Test_DelNodeW(void)
Definition: DelNode.c:482
#define FLAGS3
Definition: DelNode.c:74
#define FLAGS2
Definition: DelNode.c:73
static WCHAR * GetPathW(const WCHAR *item)
Definition: DelNode.c:369
HRESULT(WINAPI * DELNODEW)(LPCWSTR, DWORD)
Definition: DelNode.c:20
static DELNODEA s_pDelNodeA
Definition: DelNode.c:23
static char s_cur_dir_A[MAX_PATH]
Definition: DelNode.c:357
static void cleanupA(void)
Definition: DelNode.c:378
HRESULT(WINAPI * DELNODEA)(LPCSTR, DWORD)
Definition: DelNode.c:19
#define FLAGS1
Definition: DelNode.c:72
static void Test_DelNodeA(void)
Definition: DelNode.c:394
static void cleanupW(void)
Definition: DelNode.c:466
#define FLAGS6
Definition: DelNode.c:77
static WCHAR s_cur_dir_W[MAX_PATH]
Definition: DelNode.c:358
#define DelNode
Definition: advpub.h:187
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
Definition: dir.c:714
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:636
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2146
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define S_OK
Definition: intsafe.h:52
uint32_t entry
Definition: isohybrid.c:63
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
static ATOM item
Definition: dde.c:856
int k
Definition: mpi.c:3369
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
#define _countof(array)
Definition: sndvol32.h:70
Definition: DelNode.c:62
DWORD flags
Definition: DelNode.c:66
HRESULT ret
Definition: DelNode.c:67
INT lineno
Definition: DelNode.c:63
ENTRY_ACTION_TYPE action_type
Definition: DelNode.c:65
INT node
Definition: DelNode.c:64
Definition: DelNode.c:27
const char * item
Definition: DelNode.c:28
BOOL is_dir
Definition: DelNode.c:29
Definition: DelNode.c:40
const WCHAR * item
Definition: DelNode.c:41
BOOL is_dir
Definition: DelNode.c:42
Definition: cookie.c:202
int32_t INT
Definition: typedefs.h:58
Definition: dlist.c:348
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
int ret
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185