Akihiro Sagawa : msi/tests: Add CLSID registry tests for mixed package.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 21 13:37:11 CDT 2014


Module: wine
Branch: master
Commit: 0eed829f7f67364c694793a77a861dc5c9cce404
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0eed829f7f67364c694793a77a861dc5c9cce404

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Mon Jul 21 21:48:16 2014 +0900

msi/tests: Add CLSID registry tests for mixed package.

---

 dlls/msi/tests/install.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index bda3744..a99a4c4 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -1088,7 +1088,11 @@ static const char mixed_registry_dat[] =
     "s72\ti2\tl255\tL255\tL0\ts72\n"
     "Registry\tRegistry\n"
     "regdata1\t2\tSOFTWARE\\Wine\\msitest\ttest1\t\tcomp1\n"
-    "regdata2\t2\tSOFTWARE\\Wine\\msitest\ttest2\t\tcomp2\n";
+    "regdata2\t2\tSOFTWARE\\Wine\\msitest\ttest2\t\tcomp2\n"
+    "regdata3\t0\tCLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\t\tCLSID_Winetest32\tcomp1\n"
+    "regdata4\t0\tCLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32\t\twinetest32.dll\tcomp1\n"
+    "regdata5\t0\tCLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\t\tCLSID_Winetest64\tcomp2\n"
+    "regdata6\t0\tCLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32\t\twinetest64.dll\tcomp2\n";
 
 static const char mixed_install_exec_seq_dat[] =
     "Action\tCondition\tSequence\n"
@@ -5678,6 +5682,8 @@ static void test_mixed_package(void)
     UINT r;
     LONG res;
     HKEY hkey;
+    char value[MAX_PATH];
+    DWORD size;
 
     if (is_process_limited())
     {
@@ -5716,6 +5722,28 @@ static void test_mixed_package(void)
     ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
     RegCloseKey(hkey);
 
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
+    todo_wine ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res);
+    if (res == ERROR_SUCCESS) {
+        size = sizeof(value);
+        res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
+        ok(!strcmp(value, "winetest32.dll"), "got %s\n", value);
+        RegCloseKey(hkey);
+    }
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
+    ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res);
+    if (res == ERROR_SUCCESS) {
+        size = sizeof(value);
+        res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
+        ok(!strcmp(value, "winetest64.dll"), "got %s\n", value);
+        RegCloseKey(hkey);
+    }
+
     r = MsiInstallProductA(msifile, "REMOVE=ALL");
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
 
@@ -5725,6 +5753,16 @@ static void test_mixed_package(void)
     res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
     ok(res == ERROR_FILE_NOT_FOUND, "64-bit component key not removed\n");
 
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
+    ok(res == ERROR_FILE_NOT_FOUND, "32-bit CLSID key not removed\n");
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
+    ok(res == ERROR_FILE_NOT_FOUND, "64-bit CLSID key not removed\n");
+
     DeleteFileA( msifile );
     create_database_template(msifile, mixed_tables, sizeof(mixed_tables)/sizeof(msi_table), 200, "Intel;1033");
 
@@ -5747,6 +5785,28 @@ static void test_mixed_package(void)
     ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
     RegCloseKey(hkey);
 
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
+    todo_wine ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res);
+    if (res == ERROR_SUCCESS) {
+        size = sizeof(value);
+        res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
+        ok(!strcmp(value, "winetest32.dll"), "got %s\n", value);
+        RegCloseKey(hkey);
+    }
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
+    ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res);
+    if (res == ERROR_SUCCESS) {
+        size = sizeof(value);
+        res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
+        ok(!strcmp(value, "winetest64.dll"), "got %s\n", value);
+        RegCloseKey(hkey);
+    }
+
     r = MsiInstallProductA(msifile, "REMOVE=ALL");
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
 
@@ -5756,6 +5816,16 @@ static void test_mixed_package(void)
     res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
     ok(res == ERROR_FILE_NOT_FOUND, "64-bit component key not removed\n");
 
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
+    ok(res == ERROR_FILE_NOT_FOUND, "32-bit CLSID key not removed\n");
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
+                        "CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}",
+                        0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
+    ok(res == ERROR_FILE_NOT_FOUND, "64-bit CLSID key not removed\n");
+
 error:
     DeleteFileA( msifile );
 }




More information about the wine-cvs mailing list