Zebediah Figura : msi/tests: Test deferral of DuplicateFiles and RemoveDuplicateFiles.
Alexandre Julliard
julliard at winehq.org
Tue May 22 15:37:14 CDT 2018
Module: wine
Branch: master
Commit: 4d9d73e1b95ced3c66beaeab0e337c4b9eec52d5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4d9d73e1b95ced3c66beaeab0e337c4b9eec52d5
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Fri May 18 22:00:53 2018 -0500
msi/tests: Test deferral of DuplicateFiles and RemoveDuplicateFiles.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/tests/action.c | 14 ++++++++++++++
dlls/msi/tests/custom.c | 22 ++++++++++++++++++++++
dlls/msi/tests/custom.spec | 2 ++
3 files changed, 38 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 70baaa3..966158b 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 08e4bbd..aa4f667 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index 01b95e9..10e7e9d 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/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)
More information about the wine-cvs
mailing list