Hugh McMaster : regedit/tests: Test the effects of comments and new lines that appear between valid hex data lines.
Module: wine Branch: master Commit: 81fa51743605b34881047962f48651e06217fd94 URL: http://source.winehq.org/git/wine.git/?a=commit;h=81fa51743605b34881047962f4... Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Jun 27 12:31:24 2017 +0000 regedit/tests: Test the effects of comments and new lines that appear between valid hex data lines. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/tests/regedit.c | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index c293f4a..f7334e4 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -1266,6 +1266,42 @@ static void test_comments(void) todo_wine verify_reg(hkey, "Wine28e", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); verify_reg_nonexist(hkey, "Wine28f"); + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine29a\"=hex(7):4c,69,6e,65,20,\\\n" + " 63,6f,6e,63,61,74,\\\n" + ";comment\n" + " 65,6e,\\;comment\n" + " 61,74,69,6f,6e,00,00\n\n"); + todo_wine verify_reg(hkey, "Wine29a", REG_MULTI_SZ, "Line concatenation\0", 20, 0); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine29b\"=hex(7):4c,69,6e,65,20,\\\n" + " 63,6f,6e,63,61,74,\\\n" + " ;comment\n" + " 65,6e,\\;comment\n" + " 61,74,69,6f,6e,00,00\n\n"); + todo_wine verify_reg(hkey, "Wine29b", REG_MULTI_SZ, "Line concatenation\0", 20, 0); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine29c\"=hex(7):4c,69,6e,65,20,\\\n" + " 63,6f,6e,63,61,74,\\\n" + "#comment\n" + " 65,6e,\\;comment\n" + " 61,74,69,6f,6e,00,00\n\n"); + verify_reg_nonexist(hkey, "Wine29c"); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine29d\"=hex(7):4c,69,6e,65,20,\\\n" + " 63,6f,6e,63,61,74,\\\n" + " #comment\n" + " 65,6e,\\;comment\n" + " 61,74,69,6f,6e,00,00\n\n"); + verify_reg_nonexist(hkey, "Wine29d"); + RegCloseKey(hkey); lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE); @@ -1394,6 +1430,15 @@ static void test_import_with_whitespace(void) "\t@\t=\tdword:\t00000008\t\n\n"); verify_reg(hkey, "", REG_DWORD, &dword, sizeof(DWORD), 0); + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine10\"=hex(7):4c,69,6e,65,20,\\\n" + " 63,6f,6e,\\\n\n" + " 63,61,74,\\\n\n\n" + " 65,6e,\\\n\n\n\n" + " 61,74,69,6f,6e,00,00\n\n"); + verify_reg(hkey, "Wine10", REG_MULTI_SZ, "Line concatenation\0", 20, TODO_REG_SIZE); + lr = RegCloseKey(hkey); ok(lr == ERROR_SUCCESS, "RegCloseKey failed: got %d, expected 0\n", lr);
participants (1)
-
Alexandre Julliard