Zebediah Figura : msi/tests: Test deferral of RegisterProgIdInfo and UnregisterProgIdInfo.
Alexandre Julliard
julliard at winehq.org
Tue May 29 16:08:30 CDT 2018
Module: wine
Branch: master
Commit: 2fe0388d0cf205926cc9b8686b8f7ebd692261ef
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2fe0388d0cf205926cc9b8686b8f7ebd692261ef
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Mon May 28 21:07:52 2018 -0500
msi/tests: Test deferral of RegisterProgIdInfo and UnregisterProgIdInfo.
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 | 50 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/msi/tests/custom.spec | 2 ++
3 files changed, 66 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 9409ad1..22ece56 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -1654,15 +1654,28 @@ static const char rpi_install_exec_seq_dat[] =
"UnregisterClassInfo\t\t3000\n"
"UnregisterExtensionInfo\t\t3200\n"
"UnregisterProgIdInfo\t\t3400\n"
+ "upi_immediate\tREMOVE\t3401\n"
+ "upi_deferred\tREMOVE\t3402\n"
"InstallFiles\t\t3600\n"
"RegisterClassInfo\t\t4000\n"
"RegisterExtensionInfo\t\t4200\n"
"RegisterProgIdInfo\t\t4400\n"
+ "rpi_immediate\tNOT REMOVE\t4401\n"
+ "rpi_deferred\tNOT REMOVE\t4402\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
+static const char rpi_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "rpi_immediate\t1\tcustom.dll\trpi_absent\n"
+ "rpi_deferred\t1025\tcustom.dll\trpi_present\n"
+ "upi_immediate\t1\tcustom.dll\trpi_present\n"
+ "upi_deferred\t1025\tcustom.dll\trpi_absent\n";
+
static const char rmi_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2272,6 +2285,7 @@ static const msi_table rpi_tables[] =
ADD_TABLE(rpi_verb),
ADD_TABLE(rpi_progid),
ADD_TABLE(rpi_install_exec_seq),
+ ADD_TABLE(rpi_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 5e91737..f5aa344 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1726,3 +1726,53 @@ todo_wine
return ERROR_SUCCESS;
}
+
+UINT WINAPI rpi_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
+ 0, KEY_READ | KEY_WOW64_32KEY, &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+}
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI rpi_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
+ 0, KEY_READ | KEY_WOW64_32KEY, &key);
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &key);
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &key);
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &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 9dadfbd..2b3b76a 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -35,6 +35,8 @@
@ stdcall rd_absent(long)
@ stdcall rp_present(long)
@ stdcall rp_absent(long)
+@ stdcall rpi_present(long)
+@ stdcall rpi_absent(long)
@ stdcall sds_present(long)
@ stdcall sds_absent(long)
@ stdcall sis_present(long)
More information about the wine-cvs
mailing list