mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[REG_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=70120
This commit is contained in:
parent
d36141a3aa
commit
a051ee115f
1 changed files with 42 additions and 38 deletions
|
@ -110,12 +110,12 @@ static void test_add(void)
|
|||
|
||||
/* Test empty type */
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v emptyType /t \"\" /d WineTest /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */),
|
||||
todo_wine ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */),
|
||||
"got exit code %u\n", r);
|
||||
if (r == REG_EXIT_SUCCESS)
|
||||
verify_reg(hkey, "emptyType", REG_SZ, "", 1, 0);
|
||||
todo_wine verify_reg(hkey, "emptyType", REG_SZ, "", 1, 0);
|
||||
else
|
||||
win_skip("broken reg.exe detected\n");
|
||||
todo_wine win_skip("broken reg.exe detected\n");
|
||||
|
||||
/* Test input key formats */
|
||||
run_reg_exe("reg add \\HKCU\\" KEY_BASE "\\keytest0 /f", &r);
|
||||
|
@ -154,7 +154,7 @@ static void test_add(void)
|
|||
/* 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\n", r);
|
||||
verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, 0);
|
||||
verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, TODO_REG_SIZE);
|
||||
|
||||
/* REG_SZ */
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /d WineTest /f", &r);
|
||||
|
@ -171,7 +171,7 @@ static void test_add(void)
|
|||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v test /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
verify_reg(hkey, "test", REG_SZ, "", 1, 0);
|
||||
verify_reg(hkey, "test", REG_SZ, "", 1, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKEY_CURRENT_USER\\" KEY_BASE " /ve /d WineTEST /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
|
@ -179,7 +179,7 @@ static void test_add(void)
|
|||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_SZ /v test2 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
verify_reg(hkey, "test2", REG_SZ, "", 1, 0);
|
||||
verify_reg(hkey, "test2", REG_SZ, "", 1, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_SZ /v test3 /f /d \"\"", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
|
@ -188,23 +188,23 @@ static void test_add(void)
|
|||
/* REG_EXPAND_SZ */
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v expand0 /t REG_EXpand_sz /d \"dead%PATH%beef\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "expand0", REG_EXPAND_SZ, "dead%PATH%beef", 15, 0);
|
||||
verify_reg(hkey, "expand0", REG_EXPAND_SZ, "dead%PATH%beef", 15, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v expand1 /t REG_EXpand_sz /d \"dead^%PATH^%beef\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "expand1", REG_EXPAND_SZ, "dead^%PATH^%beef", 17, 0);
|
||||
verify_reg(hkey, "expand1", REG_EXPAND_SZ, "dead^%PATH^%beef", 17, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_EXPAND_SZ /v expand2 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "expand2", REG_EXPAND_SZ, "", 1, 0);
|
||||
verify_reg(hkey, "expand2", REG_EXPAND_SZ, "", 1, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKEY_CURRENT_USER\\" KEY_BASE " /ve /t REG_EXPAND_SZ /d WineTEST /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "", REG_EXPAND_SZ, "WineTEST", 9, 0);
|
||||
verify_reg(hkey, "", REG_EXPAND_SZ, "WineTEST", 9, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_EXPAND_SZ /v expand3 /f /d \"\"", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "expand3", REG_EXPAND_SZ, "", 1, 0);
|
||||
verify_reg(hkey, "expand3", REG_EXPAND_SZ, "", 1, TODO_REG_SIZE);
|
||||
|
||||
/* REG_BINARY */
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin0 /f", &r);
|
||||
|
@ -217,11 +217,11 @@ static void test_add(void)
|
|||
verify_reg(hkey, "", REG_BINARY, &dword, sizeof(DWORD), 0);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin2 /f /d x01", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin3 /f /d 01x", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin4 /f /d DeAdBeEf0DD", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
|
@ -254,14 +254,14 @@ static void test_add(void)
|
|||
win_skip("broken reg.exe detected\n");
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword1 /t REG_DWORD /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
|
||||
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
|
||||
"got exit code %d, expected 0\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword2 /t REG_DWORD /d zzz /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword3 /t REG_DWORD /d deadbeef /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword4 /t REG_DWORD /d 123xyz /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword5 /t reg_dword /d 12345678 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
|
@ -275,21 +275,22 @@ static void test_add(void)
|
|||
ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err);
|
||||
ok(type == REG_DWORD, "got wrong type %d, expected %d\n", type, REG_DWORD);
|
||||
ok(size == sizeof(DWORD), "got wrong size %d, expected %d\n", size, (int)sizeof(DWORD));
|
||||
ok(dword == 123 || broken(dword == 0123 /* WinXP */),
|
||||
todo_wine ok(dword == 123 || broken(dword == 0123 /* WinXP */),
|
||||
"got wrong data %d, expected %d\n", dword, 123);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword7 /t reg_dword /d 0xabcdefg /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword8 /t REG_dword /d 0xdeadbeef /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
dword = 0xdeadbeef;
|
||||
verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword), 0);
|
||||
verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword),
|
||||
(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);
|
||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", 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);
|
||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", 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 " /v dword8 /t REG_dword /d 0x01ffffffff /f", &r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d\n", r);
|
||||
|
@ -304,7 +305,7 @@ static void test_add(void)
|
|||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_BE /t REG_DWORD_BIG_ENDIAN /d 456 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
dword = 456;
|
||||
verify_reg(hkey, "DWORD_BE", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0);
|
||||
verify_reg(hkey, "DWORD_BE", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), TODO_REG_SIZE);
|
||||
/* REG_DWORD_BIG_ENDIAN is broken in every version of windows. It behaves like
|
||||
* an ordinary REG_DWORD - that is little endian. GG */
|
||||
|
||||
|
@ -312,41 +313,41 @@ static void test_add(void)
|
|||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d \"three\\0little\\0strings\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
memcpy(buffer, "three\0little\0strings\0", 22);
|
||||
verify_reg(hkey, "multi0", REG_MULTI_SZ, buffer, 22, 0);
|
||||
verify_reg(hkey, "multi0", REG_MULTI_SZ, buffer, 22, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi1 /s \"#\" /d \"three#little#strings\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "multi1", REG_MULTI_SZ, buffer, 22, 0);
|
||||
verify_reg(hkey, "multi1", REG_MULTI_SZ, buffer, 22, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi2 /d \"\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "multi2", REG_MULTI_SZ, &buffer[21], 1, 0);
|
||||
verify_reg(hkey, "multi2", REG_MULTI_SZ, &buffer[21], 1, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi3 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "multi3", REG_MULTI_SZ, &buffer[21], 1, 0);
|
||||
verify_reg(hkey, "multi3", REG_MULTI_SZ, &buffer[21], 1, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s \"#\" /d \"threelittlestrings\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
verify_reg(hkey, "multi4", REG_MULTI_SZ, "threelittlestrings\0", 20, 0);
|
||||
verify_reg(hkey, "multi4", REG_MULTI_SZ, "threelittlestrings\0", 20, TODO_REG_SIZE);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi5 /s \"#randomgibberish\" /d \"three#little#strings\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi6 /s \"\\0\" /d \"three\\0little\\0strings\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s \"\" /d \"three#little#strings\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi8 /s \"#\" /d \"##\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s \"#\" /d \"two##strings\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi10 /s \"#\" /d \"#a\" /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi11 /s \"#\" /d \"a#\" /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
|
||||
buffer[0]='a'; buffer[1]=0; buffer[2]=0;
|
||||
verify_reg(hkey, "multi11", REG_MULTI_SZ, buffer, 3, 0);
|
||||
verify_reg(hkey, "multi11", REG_MULTI_SZ, buffer, 3, TODO_REG_SIZE);
|
||||
|
||||
RegCloseKey(hkey);
|
||||
|
||||
|
@ -388,7 +389,7 @@ static void test_delete(void)
|
|||
run_reg_exe("reg delete HKCU\\" KEY_BASE " /ve /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
err = RegQueryValueExA(hkey, "", NULL, NULL, NULL, NULL);
|
||||
ok(err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
|
||||
todo_wine ok(err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
|
||||
|
||||
run_reg_exe("reg delete HKCU\\" KEY_BASE " /va /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
|
@ -423,7 +424,10 @@ START_TEST(reg)
|
|||
return;
|
||||
}
|
||||
|
||||
test_add();
|
||||
if (!winetest_interactive)
|
||||
skip("ROSTESTS-200: Skipping test_add because of exceptions in Cm.\n");
|
||||
else
|
||||
test_add();
|
||||
test_delete();
|
||||
test_query();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue