Commit d1fbb6b9 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit/tests: Remove elevated user checks from the Windows 3.1 test sequences.

The tests only run if regedit.exe is started with elevated privileges. This is determined when the test suite is invoked. Signed-off-by: 's avatarHugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bedd54c9
...@@ -1119,17 +1119,9 @@ static void test_basic_import_31(void) ...@@ -1119,17 +1119,9 @@ static void test_basic_import_31(void)
{ {
HKEY hkey; HKEY hkey;
DWORD dispos; DWORD dispos;
LONG lr;
/* Check if regedit.exe is running with elevated privileges */ RegCreateKeyExA(HKEY_CLASSES_ROOT, KEY_BASE, 0, NULL, REG_OPTION_NON_VOLATILE,
lr = RegCreateKeyExA(HKEY_CLASSES_ROOT, KEY_BASE, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_SET_VALUE, NULL, &hkey, &dispos);
KEY_READ|KEY_SET_VALUE, NULL, &hkey, &dispos);
if (lr == ERROR_ACCESS_DENIED)
{
win_skip("regedit.exe is not running with elevated privileges; "
"skipping Windows 3.1 import tests\n");
return;
}
if (dispos == REG_OPENED_EXISTING_KEY) if (dispos == REG_OPENED_EXISTING_KEY)
delete_value(hkey, NULL); delete_value(hkey, NULL);
...@@ -2226,17 +2218,13 @@ static void test_invalid_import_unicode(void) ...@@ -2226,17 +2218,13 @@ static void test_invalid_import_unicode(void)
static void test_invalid_import_31(void) static void test_invalid_import_31(void)
{ {
HKEY hkey; HKEY hkey;
LONG lr; DWORD dispos;
/* Check if regedit.exe is running with elevated privileges */ RegCreateKeyExA(HKEY_CLASSES_ROOT, KEY_BASE, 0, NULL, REG_OPTION_NON_VOLATILE,
lr = RegCreateKeyExA(HKEY_CLASSES_ROOT, KEY_BASE, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_SET_VALUE, NULL, &hkey, &dispos);
KEY_READ, NULL, &hkey, NULL);
if (lr == ERROR_ACCESS_DENIED) if (dispos == REG_OPENED_EXISTING_KEY)
{ delete_value(hkey, NULL);
win_skip("regedit.exe is not running with elevated privileges; "
"skipping Windows 3.1 invalid import tests\n");
return;
}
/* Test character validity at the start of the line */ /* Test character validity at the start of the line */
exec_import_str("REGEDIT\r\n" exec_import_str("REGEDIT\r\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment