[PATCH 2/2] reg/tests: Test whether comment lines ending in a backslash affect the next line
Hugh McMaster
hugh.mcmaster at outlook.com
Fri Dec 2 05:41:45 CST 2016
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/reg/tests/reg.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index d338620..6447d45 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -971,6 +971,16 @@ static void test_import(void)
if (err == ERROR_SUCCESS)
verify_reg(hkey, "Wine7", REG_SZ, "No newline", 11, 0);
+ test_import_str("REGEDIT4\n\n"
+ "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+ "#comment\\\n"
+ "\"Wine8\"=\"Line 1\"\n"
+ ";comment\\\n"
+ "\"Wine9\"=\"Line 2\"\n\n", &r);
+ todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ todo_wine verify_reg(hkey, "Wine8", REG_SZ, "Line 1", 7, 0);
+ todo_wine verify_reg(hkey, "Wine9", REG_SZ, "Line 2", 7, 0);
+
err = RegCloseKey(hkey);
todo_wine ok(err == ERROR_SUCCESS, "got %d, expected 0\n", err);
@@ -1143,6 +1153,16 @@ static void test_import(void)
if (err == ERROR_SUCCESS)
verify_reg(hkey, "Wine7", REG_SZ, "No newline", 11, 0);
+ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
+ "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+ "#comment\\\n"
+ "\"Wine8\"=\"Line 1\"\n"
+ ";comment\\\n"
+ "\"Wine9\"=\"Line 2\"\n\n", &r);
+ todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ todo_wine verify_reg(hkey, "Wine8", REG_SZ, "Line 1", 7, 0);
+ todo_wine verify_reg(hkey, "Wine9", REG_SZ, "Line 2", 7, 0);
+
err = RegCloseKey(hkey);
todo_wine ok(err == ERROR_SUCCESS, "got %d, expected 0\n", err);
--
2.7.4
More information about the wine-patches
mailing list