https://git.reactos.org/?p=reactos.git;a=commitdiff;h=07ea0dc6516a4646322ad…
commit 07ea0dc6516a4646322ade62d6a6470fb772ec7c
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:12:23 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 DuplicateFiles and RemoveDuplicateFiles.
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 4d9d73e1b95ced3c66beaeab0e337c4b9eec52d5 by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 14 ++++++++++++++
modules/rostests/winetests/msi/custom.c | 22 ++++++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 38 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 70baaa342b2..966158b9f41 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -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)
};
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 08e4bbd36d8..aa4f667abb2 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -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;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index 01b95e92b77..10e7e9d3051 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 rd_present(long)
+@ stdcall rd_absent(long)
@ stdcall sds_present(long)
@ stdcall sds_absent(long)
@ stdcall sis_present(long)