reg/tests: Add negative DWORD tests.

This commit is contained in:
Jonathan Vollebregt 2014-10-23 17:03:49 +02:00 committed by Alexandre Julliard
parent 561ac1d829
commit b2c99522a6
1 changed files with 5 additions and 0 deletions

View File

@ -180,6 +180,11 @@ static void test_add(void)
verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword), verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword),
(sizeof(long) > sizeof(DWORD)) ? 0 : TODO_REG_DATA); (sizeof(long) > sizeof(DWORD)) ? 0 : TODO_REG_DATA);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword9 /f /d -1", &r);
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword10 /f /d -0x1", &r);
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
/* REG_DWORD_LITTLE_ENDIAN */ /* REG_DWORD_LITTLE_ENDIAN */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r); run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);