mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 17:32:32 +00:00
[WINESYNC] reg/tests: Check for elevated privileges before cleaning up the Windows 3.1 test key and running unit tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id add814af3eb7368961fe5b37a66c616e4bd97e4b by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
ee54c25871
commit
e163213a0f
2 changed files with 6 additions and 6 deletions
|
@ -4204,14 +4204,11 @@ static void test_import_31(void)
|
|||
{
|
||||
LONG err;
|
||||
HKEY hkey;
|
||||
DWORD r;
|
||||
|
||||
err = RegDeleteKeyA(HKEY_CLASSES_ROOT, KEY_BASE);
|
||||
ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "RegDeleteKeyA failed: %d\n", err);
|
||||
DWORD dispos, r;
|
||||
|
||||
/* Check if reg.exe is running with elevated privileges */
|
||||
err = RegCreateKeyExA(HKEY_CLASSES_ROOT, KEY_BASE, 0, NULL, REG_OPTION_NON_VOLATILE,
|
||||
KEY_READ|KEY_SET_VALUE, NULL, &hkey, NULL);
|
||||
KEY_READ|KEY_SET_VALUE, NULL, &hkey, &dispos);
|
||||
if (err == ERROR_ACCESS_DENIED)
|
||||
{
|
||||
win_skip("reg.exe is not running with elevated privileges; "
|
||||
|
@ -4219,6 +4216,9 @@ static void test_import_31(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (dispos == REG_OPENED_EXISTING_KEY)
|
||||
delete_value(hkey, NULL);
|
||||
|
||||
/* Test simple value */
|
||||
test_import_str("REGEDIT\r\n"
|
||||
"HKEY_CLASSES_ROOT\\" KEY_BASE " = Value0\r\n", &r);
|
||||
|
|
|
@ -4,4 +4,4 @@ directories:
|
|||
files:
|
||||
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
||||
tags:
|
||||
wine: 6cf0e7fe85ba2f9348cec4d4d555c5dac42033de
|
||||
wine: add814af3eb7368961fe5b37a66c616e4bd97e4b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue