reg/tests: Add tests for trailing backslashes after the system key.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2021-04-08 22:06:51 +10:00 committed by Alexandre Julliard
parent fbd1e2eb6b
commit a47829e13d
1 changed files with 8 additions and 0 deletions

View File

@ -268,6 +268,14 @@ static void test_add(void)
verify_key(hkey, "keytest4");
delete_key(hkey, "keytest4");
run_reg_exe("reg add HKCU\\ /v Value1 /t REG_SZ /d foo /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
todo_wine verify_reg_nonexist(HKEY_CURRENT_USER, "Value1");
run_reg_exe("reg add HKEY_CURRENT_USER\\ /v Value2 /t REG_SZ /d bar /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
todo_wine verify_reg_nonexist(HKEY_CURRENT_USER, "Value2");
/* REG_NONE */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v none0 /d deadbeef /t REG_NONE /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);