https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49fb19da456d622927ee4…
commit 49fb19da456d622927ee46a19be097fb52a1f89f
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:12:24 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:48 2022 +0100
[WINESYNC] msi/tests: Test deferral of InstallFiles and RemoveFiles.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 99562a56170f51002c817cd353fa62325c056ab3 by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 8 ++++++++
modules/rostests/winetests/msi/custom.c | 18 ++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 28 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 966158b9f41..d2fad6cf812 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -643,6 +643,8 @@ static const char cf_install_exec_seq_dat[] =
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"RemoveFiles\t\t3500\n"
+ "rfi_immediate\tREMOVE\t3501\n"
+ "rfi_deferred\tREMOVE\t3502\n"
"CreateFolders\t\t3700\n"
"cf_immediate\tNOT REMOVE\t3701\n"
"cf_deferred\tNOT REMOVE\t3702\n"
@@ -650,6 +652,8 @@ static const char cf_install_exec_seq_dat[] =
"rf_immediate\tREMOVE\t3801\n"
"rf_deferred\tREMOVE\t3802\n"
"InstallFiles\t\t4000\n"
+ "ifi_immediate\tNOT REMOVE\t4001\n"
+ "ifi_deferred\tNOT REMOVE\t4002\n"
"RegisterUser\t\t6000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
@@ -665,6 +669,10 @@ static const char cf_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
+ "ifi_immediate\t1\tcustom.dll\tfile_absent\n"
+ "ifi_deferred\t1025\tcustom.dll\tfile_present\n"
+ "rfi_immediate\t1\tcustom.dll\tfile_present\n"
+ "rfi_deferred\t1025\tcustom.dll\tfile_absent\n"
"cf_immediate\t1\tcustom.dll\tcf_absent\n"
"cf_deferred\t1025\tcustom.dll\tcf_present\n"
"rf_immediate\t1\tcustom.dll\tcf_present\n"
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index aa4f667abb2..4e3e2dce8e1 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1180,6 +1180,24 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
+UINT WINAPI file_present(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ ok(hinst, pf_exists("msitest\\first\\one.txt"), "file
absent\n");
+ ok(hinst, pf_exists("msitest\\second\\two.txt"), "file
absent\n");
+}
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI file_absent(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ ok(hinst, !pf_exists("msitest\\first\\one.txt"), "file
present\n");
+ ok(hinst, !pf_exists("msitest\\second\\two.txt"), "file
present\n");
+}
+ return ERROR_SUCCESS;
+}
+
UINT WINAPI crs_present(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index 10e7e9d3051..1b15ca9f456 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -7,6 +7,8 @@
@ stdcall cf_absent(long)
@ stdcall crs_present(long)
@ stdcall crs_absent(long)
+@ stdcall file_present(long)
+@ stdcall file_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)