https://git.reactos.org/?p=reactos.git;a=commitdiff;h=51f5b077626da3265889d406acffc93224dc61ce

commit 51f5b077626da3265889d406acffc93224dc61ce
Author:     winesync <[email protected]>
AuthorDate: Sat Mar 12 15:14:46 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:27:48 2022 +0100

    [WINESYNC] msi/tests: Test deferral of MoveFiles.
    
    Signed-off-by: Zebediah Figura <[email protected]>
    Signed-off-by: Hans Leidekker <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id af737f9c2f78c448b914570005d34d61d95e7b83 by Zebediah Figura 
<[email protected]>
---
 modules/rostests/winetests/msi/action.c    | 26 +++++++++++++++++++++++++-
 modules/rostests/winetests/msi/custom.c    | 16 ++++++++++++++++
 modules/rostests/winetests/msi/custom.spec |  2 ++
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/winetests/msi/action.c 
b/modules/rostests/winetests/msi/action.c
index 943c939dc7b..1600fe39932 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -526,6 +526,29 @@ static const char mov_move_file_dat[] =
     "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
     "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
 
+static const char mov_install_exec_seq_dat[] =
+    "Action\tCondition\tSequence\n"
+    "s72\tS255\tI2\n"
+    "InstallExecuteSequence\tAction\n"
+    "CostInitialize\t\t100\n"
+    "FileCost\t\t200\n"
+    "ResolveSource\t\t300\n"
+    "CostFinalize\t\t400\n"
+    "InstallValidate\t\t500\n"
+    "InstallInitialize\t\t600\n"
+    "MoveFiles\t\t700\n"
+    "mov_immediate\t\t701\n"
+    "mov_deferred\t\t702\n"
+    "InstallFiles\t\t800\n"
+    "InstallFinalize\t\t900\n";
+
+static const char mov_custom_action_dat[] =
+    "Action\tType\tSource\tTarget\n"
+    "s72\ti2\tS64\tS0\n"
+    "CustomAction\tAction\n"
+    "mov_immediate\t1\tcustom.dll\tmov_absent\n"
+    "mov_deferred\t1025\tcustom.dll\tmov_present\n";
+
 static const char df_directory_dat[] =
     "Directory\tDirectory_Parent\tDefaultDir\n"
     "s72\tS72\tl255\n"
@@ -1843,7 +1866,8 @@ static const msi_table mov_tables[] =
     ADD_TABLE(rof_feature),
     ADD_TABLE(ci2_feature_comp),
     ADD_TABLE(ci2_file),
-    ADD_TABLE(install_exec_seq),
+    ADD_TABLE(mov_install_exec_seq),
+    ADD_TABLE(mov_custom_action),
     ADD_TABLE(rof_media),
     ADD_TABLE(property),
     ADD_TABLE(mov_move_file),
diff --git a/modules/rostests/winetests/msi/custom.c 
b/modules/rostests/winetests/msi/custom.c
index 0f34eb02f46..0bf62d972b1 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1363,3 +1363,19 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
 }
     return ERROR_SUCCESS;
 }
+
+UINT WINAPI mov_present(MSIHANDLE hinst)
+{
+    ok(hinst, pf_exists("msitest\\canada"), "file absent\n");
+    ok(hinst, pf_exists("msitest\\dominica"), "file absent\n");
+    return ERROR_SUCCESS;
+}
+
+UINT WINAPI mov_absent(MSIHANDLE hinst)
+{
+todo_wine {
+    ok(hinst, !pf_exists("msitest\\canada"), "file present\n");
+    ok(hinst, !pf_exists("msitest\\dominica"), "file present\n");
+}
+    return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec 
b/modules/rostests/winetests/msi/custom.spec
index 52feffa03f0..4b46dc3744a 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -9,6 +9,8 @@
 @ stdcall crs_absent(long)
 @ stdcall file_present(long)
 @ stdcall file_absent(long)
+@ stdcall mov_present(long)
+@ stdcall mov_absent(long)
 @ stdcall odbc_present(long)
 @ stdcall odbc_absent(long)
 @ stdcall rd_present(long)

Reply via email to