msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.

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:
Zebediah Figura 2018-05-17 22:26:09 -05:00 committed by Alexandre Julliard
parent 0f7d50c02e
commit ab9ab2a8f7
3 changed files with 30 additions and 0 deletions

View File

@ -917,12 +917,25 @@ static const char crs_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"RemoveShortcuts\t\t3000\n"
"rs_immediate\tREMOVE\t3001\n"
"rs_deferred\tREMOVE\t3002\n"
"CreateShortcuts\t\t3100\n"
"cs_immediate\tNOT REMOVE\t3101\n"
"cs_deferred\tNOT REMOVE\t3102\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
static const char crs_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"cs_immediate\t1\tcustom.dll\tcrs_absent\n"
"cs_deferred\t1025\tcustom.dll\tcrs_present\n"
"rs_immediate\t1\tcustom.dll\tcrs_present\n"
"rs_deferred\t1025\tcustom.dll\tcrs_absent\n";
static const char pub_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@ -1905,6 +1918,7 @@ static const msi_table crs_tables[] =
ADD_TABLE(crs_file),
ADD_TABLE(crs_shortcut),
ADD_TABLE(crs_install_exec_seq),
ADD_TABLE(crs_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};

View File

@ -1178,3 +1178,17 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
}
return ERROR_SUCCESS;
}
UINT WINAPI crs_present(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n");
return ERROR_SUCCESS;
}
UINT WINAPI crs_absent(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n");
return ERROR_SUCCESS;
}

View File

@ -5,3 +5,5 @@
@ stdcall nested(long)
@ stdcall cf_present(long)
@ stdcall cf_absent(long)
@ stdcall crs_present(long)
@ stdcall crs_absent(long)