Zebediah Figura : msi/tests: Test deferral of RegisterExtensionInfo and UnregisterExtensionInfo.

Alexandre Julliard julliard at winehq.org
Mon May 28 16:07:31 CDT 2018


Module: wine
Branch: master
Commit: 884d146b3243f01f00efb527bf3f3f578344da94
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=884d146b3243f01f00efb527bf3f3f578344da94

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri May 25 21:18:13 2018 -0500

msi/tests: Test deferral of RegisterExtensionInfo and UnregisterExtensionInfo.

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    | 34 ++++++++++++++++++++++++++++++++++
 dlls/msi/tests/custom.spec |  2 ++
 3 files changed, 50 insertions(+)

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 9c8f016..43d76a3 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] =
     "RemoveFiles\t\t1700\n"
     "InstallFiles\t\t2000\n"
     "UnregisterExtensionInfo\t\t3000\n"
+    "uei_immediate\tREMOVE\t3001\n"
+    "uei_deferred\tREMOVE\t3002\n"
     "RegisterExtensionInfo\t\t4000\n"
+    "rei_immediate\tNOT REMOVE\t4001\n"
+    "rei_deferred\tNOT REMOVE\t4002\n"
     "RegisterProduct\t\t5000\n"
     "PublishFeatures\t\t5100\n"
     "PublishProduct\t\t5200\n"
     "InstallFinalize\t\t6000\n";
 
+static const char rei_custom_action_dat[] =
+    "Action\tType\tSource\tTarget\n"
+    "s72\ti2\tS64\tS0\n"
+    "CustomAction\tAction\n"
+    "rei_immediate\t1\tcustom.dll\trei_absent\n"
+    "rei_deferred\t1025\tcustom.dll\trei_present\n"
+    "uei_immediate\t1\tcustom.dll\trei_present\n"
+    "uei_deferred\t1025\tcustom.dll\trei_absent\n";
+
 static const char rpi_file_dat[] =
     "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
     "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] =
     ADD_TABLE(rei_verb),
     ADD_TABLE(rei_progid),
     ADD_TABLE(rei_install_exec_seq),
+    ADD_TABLE(rei_custom_action),
     ADD_TABLE(media),
     ADD_TABLE(property)
 };
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index a3dd904..566ab1a 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
 
     return ERROR_SUCCESS;
 }
+
+UINT WINAPI rei_present(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
+    ok(hinst, !res, "got %u\n", res);
+    RegCloseKey(key);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
+    ok(hinst, !res, "got %u\n", res);
+    RegCloseKey(key);
+}
+
+    return ERROR_SUCCESS;
+}
+
+UINT WINAPI rei_absent(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
+    ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
+    ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+}
+
+    return ERROR_SUCCESS;
+}
diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index 75f665e..d302d05 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -25,6 +25,8 @@
 @ stdcall pub_absent(long)
 @ stdcall rci_present(long)
 @ stdcall rci_absent(long)
+@ stdcall rei_present(long)
+@ stdcall rei_absent(long)
 @ stdcall rd_present(long)
 @ stdcall rd_absent(long)
 @ stdcall sds_present(long)




More information about the wine-cvs mailing list