[PATCH 2/6] msi/tests: Test deferral of InstallFiles and RemoveFiles.

Zebediah Figura z.figura12 at gmail.com
Fri May 18 22:00:54 CDT 2018


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/msi/tests/action.c    |  8 ++++++++
 dlls/msi/tests/custom.c    | 18 ++++++++++++++++++
 dlls/msi/tests/custom.spec |  2 ++
 3 files changed, 28 insertions(+)

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 966158b..d2fad6c 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 9dfabf8..8a76ef9 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index 10e7e9d..1b15ca9 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 file_present(long)
+@ stdcall file_absent(long)
 @ stdcall rd_present(long)
 @ stdcall rd_absent(long)
 @ stdcall sds_present(long)
-- 
2.7.4




More information about the wine-devel mailing list