[PATCH 5/5] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.

Zebediah Figura z.figura12 at gmail.com
Mon May 14 00:29:02 CDT 2018


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

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 19159d5..78a21b7 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -917,12 +917,25 @@ static const char crs_install_exec_seq_dat[] =
     "RemoveFiles\t\t1700\n"
     "InstallFiles\t\t2000\n"
     "RemoveShortcuts\t\t3000\n"
+    "rs_immediate\tREMOVE\t3001\n"
+    "rs_deferred\tREMOVE\t3002\n"
     "CreateShortcuts\t\t3100\n"
+    "cs_immediate\tNOT REMOVE\t3101\n"
+    "cs_deferred\tNOT REMOVE\t3102\n"
     "RegisterProduct\t\t5000\n"
     "PublishFeatures\t\t5100\n"
     "PublishProduct\t\t5200\n"
     "InstallFinalize\t\t6000\n";
 
+static const char crs_custom_action_dat[] =
+    "Action\tType\tSource\tTarget\n"
+    "s72\ti2\tS64\tS0\n"
+    "CustomAction\tAction\n"
+    "cs_immediate\t1\tcustom.dll\tcrs_absent\n"
+    "cs_deferred\t1025\tcustom.dll\tcrs_present\n"
+    "rs_immediate\t1\tcustom.dll\tcrs_present\n"
+    "rs_deferred\t1025\tcustom.dll\tcrs_absent\n";
+
 static const char pub_file_dat[] =
     "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
     "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -1905,6 +1918,7 @@ static const msi_table crs_tables[] =
     ADD_TABLE(crs_file),
     ADD_TABLE(crs_shortcut),
     ADD_TABLE(crs_install_exec_seq),
+    ADD_TABLE(crs_custom_action),
     ADD_TABLE(media),
     ADD_TABLE(property)
 };
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index aeee98e..db6d612 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1178,3 +1178,17 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
 }
     return ERROR_SUCCESS;
 }
+
+UINT WINAPI crs_present(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+    ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n");
+    return ERROR_SUCCESS;
+}
+
+UINT WINAPI crs_absent(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+    ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n");
+    return ERROR_SUCCESS;
+}
diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index cac0f85..774f77b 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -5,3 +5,5 @@
 @ stdcall nested(long)
 @ stdcall cf_present(long)
 @ stdcall cf_absent(long)
+@ stdcall crs_present(long)
+@ stdcall crs_absent(long)
-- 
2.7.4




More information about the wine-devel mailing list