msi/tests: Test deferral of DuplicateFiles and RemoveDuplicateFiles.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
30fe6f4361
commit
4d9d73e1b9
|
@ -1081,13 +1081,26 @@ static const char rd_install_exec_seq_dat[] =
|
|||
"InstallInitialize\t\t1500\n"
|
||||
"ProcessComponents\t\t1600\n"
|
||||
"RemoveDuplicateFiles\t\t1900\n"
|
||||
"rd_immediate\tREMOVE\t1901\n"
|
||||
"rd_deferred\tREMOVE\t1902\n"
|
||||
"InstallFiles\t\t2000\n"
|
||||
"DuplicateFiles\t\t2100\n"
|
||||
"df_immediate\tNOT REMOVE\t2101\n"
|
||||
"df_deferred\tNOT REMOVE\t2102\n"
|
||||
"RegisterProduct\t\t5000\n"
|
||||
"PublishFeatures\t\t5100\n"
|
||||
"PublishProduct\t\t5200\n"
|
||||
"InstallFinalize\t\t6000\n";
|
||||
|
||||
static const char rd_custom_action_dat[] =
|
||||
"Action\tType\tSource\tTarget\n"
|
||||
"s72\ti2\tS64\tS0\n"
|
||||
"CustomAction\tAction\n"
|
||||
"df_immediate\t1\tcustom.dll\trd_absent\n"
|
||||
"df_deferred\t1025\tcustom.dll\trd_present\n"
|
||||
"rd_immediate\t1\tcustom.dll\trd_present\n"
|
||||
"rd_deferred\t1025\tcustom.dll\trd_absent\n";
|
||||
|
||||
static const char rrv_file_dat[] =
|
||||
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
|
||||
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
|
||||
|
@ -1996,6 +2009,7 @@ static const msi_table rd_tables[] =
|
|||
ADD_TABLE(rd_file),
|
||||
ADD_TABLE(rd_duplicate_file),
|
||||
ADD_TABLE(rd_install_exec_seq),
|
||||
ADD_TABLE(rd_custom_action),
|
||||
ADD_TABLE(media),
|
||||
ADD_TABLE(property)
|
||||
};
|
||||
|
|
|
@ -1274,3 +1274,25 @@ UINT WINAPI sss_stopped(MSIHANDLE hinst)
|
|||
CloseServiceHandle(manager);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT WINAPI rd_present(MSIHANDLE hinst)
|
||||
{
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
||||
ok(hinst, pf_exists("msitest\\original2.txt"), "file absent\n");
|
||||
ok(hinst, pf_exists("msitest\\duplicate.txt"), "file absent\n");
|
||||
}
|
||||
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
|
||||
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT WINAPI rd_absent(MSIHANDLE hinst)
|
||||
{
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
||||
ok(hinst, !pf_exists("msitest\\original2.txt"), "file present\n");
|
||||
ok(hinst, !pf_exists("msitest\\duplicate.txt"), "file present\n");
|
||||
}
|
||||
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
|
||||
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
@ stdcall cf_absent(long)
|
||||
@ stdcall crs_present(long)
|
||||
@ stdcall crs_absent(long)
|
||||
@ stdcall rd_present(long)
|
||||
@ stdcall rd_absent(long)
|
||||
@ stdcall sds_present(long)
|
||||
@ stdcall sds_absent(long)
|
||||
@ stdcall sis_present(long)
|
||||
|
|
Loading…
Reference in New Issue