ole32/tests: Fix tests failing on limited account.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0beb178a2e
commit
485a412b18
|
@ -2364,17 +2364,21 @@ static void test_OleRegGetUserType(void)
|
|||
StringFromGUID2(&CLSID_non_existent, clsidW, sizeof(clsidW)/sizeof(clsidW[0]));
|
||||
|
||||
ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsidkeyW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &clsidhkey, &disposition);
|
||||
if (!ret)
|
||||
{
|
||||
ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
|
||||
if (ret)
|
||||
RegCloseKey(clsidhkey);
|
||||
}
|
||||
|
||||
if (ret == ERROR_ACCESS_DENIED)
|
||||
{
|
||||
skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
|
||||
win_skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
|
||||
|
||||
ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
|
||||
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
|
||||
|
||||
ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW));
|
||||
ok(!ret, "got %d, error %d\n", ret, GetLastError());
|
||||
|
||||
|
|
Loading…
Reference in New Issue