[PATCH 1/4] msi/tests: Test deferral of RegisterClassInfo and UnregisterClassInfo.
Zebediah Figura
z.figura12 at gmail.com
Fri May 25 21:18:12 CDT 2018
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/msi/tests/action.c | 14 ++++++++++++++
dlls/msi/tests/custom.c | 43 +++++++++++++++++++++++++++++++++++++++++++
dlls/msi/tests/custom.spec | 2 ++
3 files changed, 59 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 3d74704..9c8f016 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -1463,12 +1463,25 @@ static const char rci_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterClassInfo\t\t3000\n"
+ "uci_immediate\tREMOVE\t3001\n"
+ "uci_deferred\tREMOVE\t3002\n"
"RegisterClassInfo\t\t4000\n"
+ "rci_immediate\tNOT REMOVE\t4001\n"
+ "rci_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
+static const char rci_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "rci_immediate\t1\tcustom.dll\trci_absent\n"
+ "rci_deferred\t1025\tcustom.dll\trci_present\n"
+ "uci_immediate\t1\tcustom.dll\trci_present\n"
+ "uci_deferred\t1025\tcustom.dll\trci_absent\n";
+
static const char rei_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2181,6 +2194,7 @@ static const msi_table rci_tables[] =
ADD_TABLE(rci_appid),
ADD_TABLE(rci_class),
ADD_TABLE(rci_install_exec_seq),
+ ADD_TABLE(rci_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index cfb368f..a3dd904 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1565,3 +1565,46 @@ todo_wine
return ERROR_SUCCESS;
}
+
+UINT WINAPI rci_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, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+}
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI rci_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, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &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 d8b5f08..75f665e 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -23,6 +23,8 @@
@ stdcall ppc_absent(long)
@ stdcall pub_present(long)
@ stdcall pub_absent(long)
+@ stdcall rci_present(long)
+@ stdcall rci_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