2 * Unit tests for advpack.dll file functions
4 * Copyright (C) 2006 James Hawkins
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
25 #include "wine/test.h"
27 /* make the max size large so there is only one cab file */
28 #define MEDIA_SIZE 999999999
29 #define FOLDER_THRESHOLD 900000
31 /* function pointers */
33 static HRESULT (WINAPI
*pAddDelBackupEntry
)(LPCSTR
, LPCSTR
, LPCSTR
, DWORD
);
34 static HRESULT (WINAPI
*pExtractFiles
)(LPCSTR
, LPCSTR
, DWORD
, LPCSTR
, LPVOID
, DWORD
);
35 static HRESULT (WINAPI
*pAdvInstallFile
)(HWND
,LPCSTR
,LPCSTR
,LPCSTR
,LPCSTR
,DWORD
,DWORD
);
37 CHAR CURR_DIR
[MAX_PATH
];
39 static void init_function_pointers(void)
41 hAdvPack
= LoadLibraryA("advpack.dll");
45 pAddDelBackupEntry
= (void *)GetProcAddress(hAdvPack
, "AddDelBackupEntry");
46 pExtractFiles
= (void *)GetProcAddress(hAdvPack
, "ExtractFiles");
47 pAdvInstallFile
= (void*)GetProcAddress(hAdvPack
, "AdvInstallFile");
51 /* creates a file with the specified name for tests */
52 static void createTestFile(const CHAR
*name
)
57 file
= CreateFileA(name
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
, 0, NULL
);
58 ok(file
!= INVALID_HANDLE_VALUE
, "Failure to open file %s\n", name
);
59 WriteFile(file
, name
, strlen(name
), &written
, NULL
);
60 WriteFile(file
, "\n", strlen("\n"), &written
, NULL
);
64 static void create_test_files(void)
68 GetCurrentDirectoryA(MAX_PATH
, CURR_DIR
);
69 len
= lstrlenA(CURR_DIR
);
71 if(len
&& (CURR_DIR
[len
-1] == '\\'))
74 createTestFile("a.txt");
75 createTestFile("b.txt");
76 CreateDirectoryA("testdir", NULL
);
77 createTestFile("testdir\\c.txt");
78 createTestFile("testdir\\d.txt");
79 CreateDirectoryA("dest", NULL
);
82 static void delete_test_files(void)
86 DeleteFileA("testdir\\c.txt");
87 DeleteFileA("testdir\\d.txt");
88 RemoveDirectoryA("testdir");
89 RemoveDirectoryA("dest");
91 DeleteFileA("extract.cab");
94 static BOOL
check_ini_file_attr(LPSTR filename
)
97 DWORD expected
= FILE_ATTRIBUTE_HIDDEN
| FILE_ATTRIBUTE_READONLY
;
98 DWORD attr
= GetFileAttributesA(filename
);
100 ret
= (attr
& expected
) && (attr
!= INVALID_FILE_ATTRIBUTES
);
101 SetFileAttributesA(filename
, FILE_ATTRIBUTE_NORMAL
);
108 static BOOL
check_ini_contents(LPSTR filename
, BOOL add
)
110 CHAR field
[FIELD_LEN
];
111 BOOL ret
= TRUE
, match
;
113 GetPrivateProfileStringA("backup", "one", NULL
, field
, FIELD_LEN
, filename
);
114 match
= !lstrcmpA(field
, "-1,0,0,0,0,0,-1");
115 if ((add
&& !match
) || (!add
&& match
)) {
116 trace("first test: got %s\n", field
);
120 GetPrivateProfileStringA("backup", "two", NULL
, field
, FIELD_LEN
, filename
);
121 if (lstrcmpA(field
, "-1,0,0,0,0,0,-1")) {
122 trace("second test: got %s\n", field
);
126 GetPrivateProfileStringA("backup", "three", NULL
, field
, FIELD_LEN
, filename
);
127 match
= !lstrcmpA(field
, "-1,0,0,0,0,0,-1");
128 if ((add
&& !match
) || (!add
&& match
)) {
129 trace("third test: got %s\n", field
);
136 static void test_AddDelBackupEntry(void)
140 CHAR windir
[MAX_PATH
];
142 lstrcpyA(path
, CURR_DIR
);
143 lstrcatA(path
, "\\backup\\basename.INI");
145 /* native AddDelBackupEntry crashes if lpcszBaseName is NULL */
147 /* try a NULL file list */
148 res
= pAddDelBackupEntry(NULL
, "backup", "basename", AADBE_ADD_ENTRY
);
149 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
150 ok(!DeleteFileA(path
), "Expected path to not exist\n");
152 lstrcpyA(path
, CURR_DIR
);
153 lstrcatA(path
, "\\backup\\.INI");
155 /* try an empty base name */
156 res
= pAddDelBackupEntry("one\0two\0three\0", "backup", "", AADBE_ADD_ENTRY
);
157 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
158 ok(!DeleteFileA(path
), "Expected path to not exist\n");
160 lstrcpyA(path
, CURR_DIR
);
161 lstrcatA(path
, "\\basename.INI");
163 /* try an invalid flag */
164 res
= pAddDelBackupEntry("one\0two\0three\0", NULL
, "basename", 0);
165 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
166 ok(!DeleteFileA(path
), "Expected path to not exist\n");
168 lstrcpyA(path
, "c:\\basename.INI");
170 /* create the INF file */
171 res
= pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY
);
172 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
173 ok(check_ini_file_attr(path
), "Expected ini file to be hidden\n");
174 ok(check_ini_contents(path
, TRUE
), "Expected ini contents to match\n");
175 ok(DeleteFileA(path
), "Expected path to exist\n");
177 lstrcpyA(path
, CURR_DIR
);
178 lstrcatA(path
, "\\backup\\basename.INI");
180 /* try to create the INI file in a nonexistent directory */
181 RemoveDirectoryA("backup");
182 res
= pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY
);
183 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
184 ok(!check_ini_file_attr(path
), "Expected ini file to not be hidden\n");
185 ok(!check_ini_contents(path
, TRUE
), "Expected ini contents to not match\n");
186 ok(!DeleteFileA(path
), "Expected path to not exist\n");
188 /* try an existent, relative backup directory */
189 CreateDirectoryA("backup", NULL
);
190 res
= pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY
);
191 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
192 ok(check_ini_file_attr(path
), "Expected ini file to be hidden\n");
193 ok(check_ini_contents(path
, TRUE
), "Expected ini contents to match\n");
194 ok(DeleteFileA(path
), "Expected path to exist\n");
195 RemoveDirectoryA("backup");
197 GetWindowsDirectoryA(windir
, sizeof(windir
));
198 sprintf(path
, "%s\\basename.INI", windir
);
200 /* try a NULL backup dir, INI is created in the windows directory */
201 res
= pAddDelBackupEntry("one\0two\0three\0", NULL
, "basename", AADBE_ADD_ENTRY
);
202 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
203 ok(check_ini_contents(path
, TRUE
), "Expected ini contents to match\n");
205 /* remove the entries with AADBE_DEL_ENTRY */
206 SetFileAttributesA(path
, FILE_ATTRIBUTE_NORMAL
);
207 res
= pAddDelBackupEntry("one\0three\0", NULL
, "basename", AADBE_DEL_ENTRY
);
208 SetFileAttributesA(path
, FILE_ATTRIBUTE_NORMAL
);
209 ok(res
== S_OK
, "Expected S_OK, got %d\n", res
);
210 ok(check_ini_contents(path
, FALSE
), "Expected ini contents to match\n");
211 ok(DeleteFileA(path
), "Expected path to exist\n");
214 /* the FCI callbacks */
216 static void *mem_alloc(ULONG cb
)
218 return HeapAlloc(GetProcessHeap(), 0, cb
);
221 static void mem_free(void *memory
)
223 HeapFree(GetProcessHeap(), 0, memory
);
226 static BOOL
get_next_cabinet(PCCAB pccab
, ULONG cbPrevCab
, void *pv
)
231 static long progress(UINT typeStatus
, ULONG cb1
, ULONG cb2
, void *pv
)
236 static int file_placed(PCCAB pccab
, char *pszFile
, long cbFile
,
237 BOOL fContinuation
, void *pv
)
242 static INT_PTR
fci_open(char *pszFile
, int oflag
, int pmode
, int *err
, void *pv
)
246 DWORD dwShareMode
= 0;
247 DWORD dwCreateDisposition
= OPEN_EXISTING
;
249 dwAccess
= GENERIC_READ
| GENERIC_WRITE
;
250 /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */
251 dwShareMode
= FILE_SHARE_READ
| FILE_SHARE_WRITE
;
253 if (GetFileAttributesA(pszFile
) != INVALID_FILE_ATTRIBUTES
)
254 dwCreateDisposition
= OPEN_EXISTING
;
256 dwCreateDisposition
= CREATE_NEW
;
258 handle
= CreateFileA(pszFile
, dwAccess
, dwShareMode
, NULL
,
259 dwCreateDisposition
, 0, NULL
);
261 ok(handle
!= INVALID_HANDLE_VALUE
, "Failed to CreateFile %s\n", pszFile
);
263 return (INT_PTR
)handle
;
266 static UINT
fci_read(INT_PTR hf
, void *memory
, UINT cb
, int *err
, void *pv
)
268 HANDLE handle
= (HANDLE
)hf
;
272 res
= ReadFile(handle
, memory
, cb
, &dwRead
, NULL
);
273 ok(res
, "Failed to ReadFile\n");
278 static UINT
fci_write(INT_PTR hf
, void *memory
, UINT cb
, int *err
, void *pv
)
280 HANDLE handle
= (HANDLE
)hf
;
284 res
= WriteFile(handle
, memory
, cb
, &dwWritten
, NULL
);
285 ok(res
, "Failed to WriteFile\n");
290 static int fci_close(INT_PTR hf
, int *err
, void *pv
)
292 HANDLE handle
= (HANDLE
)hf
;
293 ok(CloseHandle(handle
), "Failed to CloseHandle\n");
298 static long fci_seek(INT_PTR hf
, long dist
, int seektype
, int *err
, void *pv
)
300 HANDLE handle
= (HANDLE
)hf
;
303 ret
= SetFilePointer(handle
, dist
, NULL
, seektype
);
304 ok(ret
!= INVALID_SET_FILE_POINTER
, "Failed to SetFilePointer\n");
309 static int fci_delete(char *pszFile
, int *err
, void *pv
)
311 BOOL ret
= DeleteFileA(pszFile
);
312 ok(ret
, "Failed to DeleteFile %s\n", pszFile
);
317 static BOOL
get_temp_file(char *pszTempName
, int cbTempName
, void *pv
)
321 tempname
= HeapAlloc(GetProcessHeap(), 0, MAX_PATH
);
322 GetTempFileNameA(".", "xx", 0, tempname
);
324 if (tempname
&& (strlen(tempname
) < (unsigned)cbTempName
))
326 lstrcpyA(pszTempName
, tempname
);
327 HeapFree(GetProcessHeap(), 0, tempname
);
331 HeapFree(GetProcessHeap(), 0, tempname
);
336 static INT_PTR
get_open_info(char *pszName
, USHORT
*pdate
, USHORT
*ptime
,
337 USHORT
*pattribs
, int *err
, void *pv
)
339 BY_HANDLE_FILE_INFORMATION finfo
;
345 handle
= CreateFile(pszName
, GENERIC_READ
, FILE_SHARE_READ
, NULL
,
346 OPEN_EXISTING
, FILE_ATTRIBUTE_NORMAL
| FILE_FLAG_SEQUENTIAL_SCAN
, NULL
);
348 ok(handle
!= INVALID_HANDLE_VALUE
, "Failed to CreateFile %s\n", pszName
);
350 res
= GetFileInformationByHandle(handle
, &finfo
);
351 ok(res
, "Expected GetFileInformationByHandle to succeed\n");
353 FileTimeToLocalFileTime(&finfo
.ftLastWriteTime
, &filetime
);
354 FileTimeToDosDateTime(&filetime
, pdate
, ptime
);
356 attrs
= GetFileAttributes(pszName
);
357 ok(attrs
!= INVALID_FILE_ATTRIBUTES
, "Failed to GetFileAttributes\n");
359 return (INT_PTR
)handle
;
362 static void add_file(HFCI hfci
, char *file
)
367 lstrcpyA(path
, CURR_DIR
);
368 lstrcatA(path
, "\\");
369 lstrcatA(path
, file
);
371 res
= FCIAddFile(hfci
, path
, file
, FALSE
, get_next_cabinet
, progress
,
372 get_open_info
, tcompTYPE_MSZIP
);
373 ok(res
, "Expected FCIAddFile to succeed\n");
376 static void set_cab_parameters(PCCAB pCabParams
)
378 ZeroMemory(pCabParams
, sizeof(CCAB
));
380 pCabParams
->cb
= MEDIA_SIZE
;
381 pCabParams
->cbFolderThresh
= FOLDER_THRESHOLD
;
382 pCabParams
->setID
= 0xbeef;
383 lstrcpyA(pCabParams
->szCabPath
, CURR_DIR
);
384 lstrcatA(pCabParams
->szCabPath
, "\\");
385 lstrcpyA(pCabParams
->szCab
, "extract.cab");
388 static void create_cab_file(void)
393 static CHAR a_txt
[] = "a.txt",
395 testdir_c_txt
[] = "testdir\\c.txt",
396 testdir_d_txt
[] = "testdir\\d.txt";
399 set_cab_parameters(&cabParams
);
401 hfci
= FCICreate(&erf
, file_placed
, mem_alloc
, mem_free
, fci_open
,
402 fci_read
, fci_write
, fci_close
, fci_seek
, fci_delete
,
403 get_temp_file
, &cabParams
, NULL
);
405 ok(hfci
!= NULL
, "Failed to create an FCI context\n");
407 add_file(hfci
, a_txt
);
408 add_file(hfci
, b_txt
);
409 add_file(hfci
, testdir_c_txt
);
410 add_file(hfci
, testdir_d_txt
);
412 res
= FCIFlushCabinet(hfci
, FALSE
, get_next_cabinet
, progress
);
413 ok(res
, "Failed to flush the cabinet\n");
415 res
= FCIDestroy(hfci
);
416 ok(res
, "Failed to destroy the cabinet\n");
419 static void test_ExtractFiles(void)
422 char destFolder
[MAX_PATH
];
424 lstrcpyA(destFolder
, CURR_DIR
);
425 lstrcatA(destFolder
, "\\");
426 lstrcatA(destFolder
, "dest");
428 /* try NULL cab file */
429 hr
= pExtractFiles(NULL
, destFolder
, 0, NULL
, NULL
, 0);
430 ok(hr
== E_INVALIDARG
, "Expected E_INVALIDARG, got %d\n", hr
);
431 ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
433 /* try NULL destination */
434 hr
= pExtractFiles("extract.cab", NULL
, 0, NULL
, NULL
, 0);
435 ok(hr
== E_INVALIDARG
, "Expected E_INVALIDARG, got %d\n", hr
);
436 ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n");
438 /* extract all files in the cab to nonexistent destination directory */
439 hr
= pExtractFiles("extract.cab", destFolder
, 0, NULL
, NULL
, 0);
440 ok(hr
== HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND
),
441 "Expected %d, got %d\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND
), hr
);
442 ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
443 ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
444 ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
445 ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n");
447 /* extract all files in the cab to the destination directory */
448 CreateDirectoryA("dest", NULL
);
449 hr
= pExtractFiles("extract.cab", destFolder
, 0, NULL
, NULL
, 0);
450 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
451 ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
452 ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
453 ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
454 ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n");
455 ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
457 /* extract all files to a relative destination directory */
458 hr
= pExtractFiles("extract.cab", "dest", 0, NULL
, NULL
, 0);
459 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
460 ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
461 ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
462 ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
463 ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n");
464 ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
466 /* only extract two of the files from the cab */
467 hr
= pExtractFiles("extract.cab", "dest", 0, "a.txt:testdir\\c.txt", NULL
, 0);
468 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
469 ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
470 ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
471 ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
472 ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n");
473 ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n");
475 /* use valid chars before and after file list */
476 hr
= pExtractFiles("extract.cab", "dest", 0, " :\t: a.txt:testdir\\c.txt \t:", NULL
, 0);
477 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
478 ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
479 ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
480 ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
481 ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n");
482 ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n");
484 /* use invalid chars before and after file list */
485 hr
= pExtractFiles("extract.cab", "dest", 0, " +-\\ a.txt:testdir\\c.txt a_:", NULL
, 0);
486 ok(hr
== E_FAIL
, "Expected E_FAIL, got %d\n", hr
);
487 ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
488 ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
489 ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
491 /* try an empty file list */
492 hr
= pExtractFiles("extract.cab", "dest", 0, "", NULL
, 0);
493 ok(hr
== E_FAIL
, "Expected E_FAIL, got %d\n", hr
);
494 ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
495 ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
497 /* try a nonexistent file in the file list */
498 hr
= pExtractFiles("extract.cab", "dest", 0, "a.txt:idontexist:testdir\\c.txt", NULL
, 0);
499 ok(hr
== E_FAIL
, "Expected E_FAIL, got %d\n", hr
);
500 ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
501 ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
502 ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
505 static void test_AdvInstallFile(void)
508 char CURR_DIR
[MAX_PATH
];
509 char destFolder
[MAX_PATH
];
511 GetCurrentDirectoryA(MAX_PATH
, CURR_DIR
);
513 lstrcpyA(destFolder
, CURR_DIR
);
514 lstrcatA(destFolder
, "\\");
515 lstrcatA(destFolder
, "dest");
517 createTestFile("source.txt");
519 /* try invalid source directory */
520 hr
= pAdvInstallFile(NULL
, NULL
, "source.txt", destFolder
, "destination.txt", 0, 0);
521 ok(hr
== E_INVALIDARG
, "Expected E_INVALIDARG, got %d\n", hr
);
522 ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
524 /* try invalid source file */
525 hr
= pAdvInstallFile(NULL
, CURR_DIR
, NULL
, destFolder
, "destination.txt", 0, 0);
526 ok(hr
== E_INVALIDARG
, "Expected E_INVALIDARG, got %d\n", hr
);
527 ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
529 /* try invalid destination directory */
530 hr
= pAdvInstallFile(NULL
, CURR_DIR
, "source.txt", NULL
, "destination.txt", 0, 0);
531 ok(hr
== E_INVALIDARG
, "Expected E_INVALIDARG, got %d\n", hr
);
532 ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
534 /* try copying to nonexistent destination directory */
535 hr
= pAdvInstallFile(NULL
, CURR_DIR
, "source.txt", destFolder
, "destination.txt", 0, 0);
536 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
537 ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
539 /* native windows screws up if the source file doesn't exist */
541 /* test AIF_NOOVERWRITE behavior, asks the user to overwrite if AIF_QUIET is not specified */
542 createTestFile("dest\\destination.txt");
543 hr
= pAdvInstallFile(NULL
, CURR_DIR
, "source.txt", destFolder
,
544 "destination.txt", AIF_NOOVERWRITE
| AIF_QUIET
, 0);
545 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
546 ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
547 ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
549 DeleteFileA("source.txt");
554 init_function_pointers();
558 test_AddDelBackupEntry();
560 test_AdvInstallFile();