[PATCH 1/2] regedit: Hex data lines may be terminated by a semicolon
Hugh McMaster
hugh.mcmaster at outlook.com
Thu Jul 6 04:17:00 CDT 2017
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/regedit/regproc.c | 2 ++
programs/regedit/tests/regedit.c | 12 ++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index cddebf7a81..9fe0cb81b2 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -303,6 +303,8 @@ static BOOL convert_hex_csv_to_hex(struct parser *parser, WCHAR **str)
*str = end + 1;
return TRUE;
}
+ else if (*end == ';')
+ return TRUE;
return FALSE;
}
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index eeaa5804ef..8c0f1ba545 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -363,7 +363,7 @@ static void test_basic_import(void)
verify_reg(hkey, "Wine10b", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0);
verify_reg(hkey, "Wine10c", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0);
verify_reg(hkey, "Wine10d", REG_NONE, "V\0a\0l\0u", 8, 0);
- todo_wine verify_reg(hkey, "Wine10e", REG_NONE, "V\0a\0l\0u", 8, 0);
+ verify_reg(hkey, "Wine10e", REG_NONE, "V\0a\0l\0u", 8, 0);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
@@ -383,7 +383,7 @@ static void test_basic_import(void)
verify_reg(hkey, "Wine11b", REG_EXPAND_SZ, "%PATH%", 7, 0);
verify_reg(hkey, "Wine11c", REG_EXPAND_SZ, "%PATH%", 7, 0);
verify_reg(hkey, "Wine11d", REG_EXPAND_SZ, "%PATH", 6, TODO_REG_SIZE);
- todo_wine verify_reg(hkey, "Wine11e", REG_EXPAND_SZ, "%PATH", 6, 0);
+ verify_reg(hkey, "Wine11e", REG_EXPAND_SZ, "%PATH", 6, TODO_REG_SIZE);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
@@ -405,7 +405,7 @@ static void test_basic_import(void)
verify_reg(hkey, "Wine12b", REG_BINARY, hex, sizeof(hex), 0);
verify_reg(hkey, "Wine12c", REG_BINARY, hex, sizeof(hex), 0);
verify_reg(hkey, "Wine12d", REG_BINARY, hex, 6, 0);
- todo_wine verify_reg(hkey, "Wine12e", REG_BINARY, hex, 6, 0);
+ verify_reg(hkey, "Wine12e", REG_BINARY, hex, 6, 0);
/* Test import with subkeys */
exec_import_str("REGEDIT4\n\n"
@@ -504,7 +504,7 @@ static void test_basic_import(void)
verify_reg(hkey, "Wine18b", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
verify_reg(hkey, "Wine18c", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
verify_reg(hkey, "Wine18d", REG_MULTI_SZ, "Line concat", 12, TODO_REG_SIZE);
- todo_wine verify_reg(hkey, "Wine18e", REG_MULTI_SZ, "Line concat", 12, 0);
+ verify_reg(hkey, "Wine18e", REG_MULTI_SZ, "Line concat", 12, TODO_REG_SIZE);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
@@ -524,7 +524,7 @@ static void test_basic_import(void)
verify_reg(hkey, "Wine19b", 0x100, "%PATH%", 7, 0);
verify_reg(hkey, "Wine19c", 0x100, "%PATH%", 7, 0);
verify_reg(hkey, "Wine19d", 0x100, "%PATH", 5, 0);
- todo_wine verify_reg(hkey, "Wine19e", 0x100, "%PATH", 5, 0);
+ verify_reg(hkey, "Wine19e", 0x100, "%PATH", 5, 0);
/* Test null-termination of REG_EXPAND_SZ and REG_MULTI_SZ data*/
exec_import_str("REGEDIT4\n\n"
@@ -1300,7 +1300,7 @@ static void test_comments(void)
" 63,6f,6e,\\;comment\n"
" 63,61,74,;comment\n"
" 65,6e,61,74,69,6f,6e,00,00\n\n");
- todo_wine verify_reg(hkey, "Multi-Line2", REG_MULTI_SZ, "Line concat", 12, 0);
+ verify_reg(hkey, "Multi-Line2", REG_MULTI_SZ, "Line concat", 12, TODO_REG_SIZE);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
--
2.11.0
More information about the wine-patches
mailing list