[WINESYNC] reg: Support the use of registry views during the 'add' operation.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 304b80a9b5a6ed128dd8a89e22f05b99142310cd by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
winesync 2022-01-17 18:47:36 +01:00 committed by Thomas Csovcsity
parent 334c2e278c
commit ad80ceabc3
3 changed files with 35 additions and 21 deletions

View file

@ -277,13 +277,13 @@ static void test_command_syntax(void)
/* Test registry view */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v abc /d 123 /f /reg:32 /reg:32", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v abc /d 123 /f /reg:32 /reg:64", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v abc /d 123 /f /reg:64 /reg:64", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
}
static void test_key_formats(void)
@ -914,12 +914,12 @@ static void test_registry_view_win64(void)
run_reg_exe("reg add HKLM\\" KEY_BASE " /v Wine32 /d Test /f /reg:32", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey);
todo_wine verify_reg(hkey, "Wine32", REG_SZ, "Test", 5, 0);
todo_wine close_key(hkey);
todo_wine delete_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey);
verify_reg(hkey, "Wine32", REG_SZ, "Test", 5, 0);
close_key(hkey);
delete_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
todo_wine verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
/* Try adding to the 64-bit registry view (64-bit Windows) */
run_reg_exe("reg add HKLM\\" KEY_BASE " /v Wine64 /d Test /f /reg:64", &r);
@ -958,16 +958,16 @@ static void test_registry_view_wow64(void)
run_reg_exe("reg add HKLM\\" KEY_BASE " /v Wine64 /d Test /f /reg:64", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
todo_wine verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0);
todo_wine close_key(hkey);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0);
close_key(hkey);
todo_wine open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
todo_wine verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0);
todo_wine close_key(hkey);
todo_wine delete_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0);
close_key(hkey);
delete_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
todo_wine verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
}
START_TEST(add)