Commit 10772381 authored by Vitaly Perov's avatar Vitaly Perov Committed by Alexandre Julliard

cabinet: Added a test for FDICopy with an empty cabinet file.

parent f51e0e2d
......@@ -593,9 +593,54 @@ static void test_FDIIsCabinet(void)
delete_test_files();
}
INT_PTR __cdecl CopyProgress (FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
{
return 0;
}
static void test_FDICopy(void)
{
CCAB cabParams;
HFDI hfdi;
HFCI hfci;
ERF erf;
BOOL ret;
char name[] = "extract.cab";
char path[MAX_PATH + 1];
GetCurrentDirectoryA(MAX_PATH, path);
set_cab_parameters(&cabParams);
hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open,
fci_read, fci_write, fci_close, fci_seek,
fci_delete, get_temp_file, &cabParams, NULL);
ret = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress);
ok(ret, "Failed to flush the cabinet\n");
FCIDestroy(hfci);
hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read,
fdi_write, fdi_close, fdi_seek,
cpuUNKNOWN, &erf);
ret=FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0);
todo_wine
{
ok(ret, "Expected FDICopy to succeed\n");
}
FDIDestroy(hfdi);
DeleteFileA(name);
}
START_TEST(fdi)
{
test_FDICreate();
test_FDIDestroy();
test_FDIIsCabinet();
test_FDICopy();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment