reg/tests: Add tests for invalid switches.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-06-08 10:48:06 +00:00 committed by Alexandre Julliard
parent 31efcc634a
commit 57c39cf2b6
1 changed files with 13 additions and 0 deletions

View File

@ -450,6 +450,19 @@ static void test_add(void)
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dup2 /t REG_DWORD /d 123 /f /d 456", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
/* Test invalid switches */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v invalid1 /a", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v invalid2 /ae", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v invalid3 /", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v invalid4 -", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
ok(err == ERROR_SUCCESS, "got %d\n", err);
}