Skip to content

Commit 49fb19d

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of InstallFiles and RemoveFiles.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 99562a56170f51002c817cd353fa62325c056ab3 by Zebediah Figura <[email protected]>
1 parent 07ea0dc commit 49fb19d

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,17 @@ static const char cf_install_exec_seq_dat[] =
643643
"CostInitialize\t\t800\n"
644644
"FileCost\t\t900\n"
645645
"RemoveFiles\t\t3500\n"
646+
"rfi_immediate\tREMOVE\t3501\n"
647+
"rfi_deferred\tREMOVE\t3502\n"
646648
"CreateFolders\t\t3700\n"
647649
"cf_immediate\tNOT REMOVE\t3701\n"
648650
"cf_deferred\tNOT REMOVE\t3702\n"
649651
"RemoveFolders\t\t3800\n"
650652
"rf_immediate\tREMOVE\t3801\n"
651653
"rf_deferred\tREMOVE\t3802\n"
652654
"InstallFiles\t\t4000\n"
655+
"ifi_immediate\tNOT REMOVE\t4001\n"
656+
"ifi_deferred\tNOT REMOVE\t4002\n"
653657
"RegisterUser\t\t6000\n"
654658
"RegisterProduct\t\t6100\n"
655659
"PublishFeatures\t\t6300\n"
@@ -665,6 +669,10 @@ static const char cf_custom_action_dat[] =
665669
"Action\tType\tSource\tTarget\n"
666670
"s72\ti2\tS64\tS0\n"
667671
"CustomAction\tAction\n"
672+
"ifi_immediate\t1\tcustom.dll\tfile_absent\n"
673+
"ifi_deferred\t1025\tcustom.dll\tfile_present\n"
674+
"rfi_immediate\t1\tcustom.dll\tfile_present\n"
675+
"rfi_deferred\t1025\tcustom.dll\tfile_absent\n"
668676
"cf_immediate\t1\tcustom.dll\tcf_absent\n"
669677
"cf_deferred\t1025\tcustom.dll\tcf_present\n"
670678
"rf_immediate\t1\tcustom.dll\tcf_present\n"

modules/rostests/winetests/msi/custom.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,24 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
11801180
return ERROR_SUCCESS;
11811181
}
11821182

1183+
UINT WINAPI file_present(MSIHANDLE hinst)
1184+
{
1185+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1186+
ok(hinst, pf_exists("msitest\\first\\one.txt"), "file absent\n");
1187+
ok(hinst, pf_exists("msitest\\second\\two.txt"), "file absent\n");
1188+
}
1189+
return ERROR_SUCCESS;
1190+
}
1191+
1192+
UINT WINAPI file_absent(MSIHANDLE hinst)
1193+
{
1194+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1195+
ok(hinst, !pf_exists("msitest\\first\\one.txt"), "file present\n");
1196+
ok(hinst, !pf_exists("msitest\\second\\two.txt"), "file present\n");
1197+
}
1198+
return ERROR_SUCCESS;
1199+
}
1200+
11831201
UINT WINAPI crs_present(MSIHANDLE hinst)
11841202
{
11851203
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@ stdcall cf_absent(long)
88
@ stdcall crs_present(long)
99
@ stdcall crs_absent(long)
10+
@ stdcall file_present(long)
11+
@ stdcall file_absent(long)
1012
@ stdcall rd_present(long)
1113
@ stdcall rd_absent(long)
1214
@ stdcall sds_present(long)

0 commit comments

Comments
 (0)