Hugh McMaster : reg/tests: Test whether comment lines ending in a backslash affect the next line.

Alexandre Julliard julliard at winehq.org
Fri Dec 2 17:00:09 CST 2016


Module: wine
Branch: master
Commit: f4334f29f81714da25d3e0b7e77346ef2d64725b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f4334f29f81714da25d3e0b7e77346ef2d64725b

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri Dec  2 11:41:45 2016 +0000

reg/tests: Test whether comment lines ending in a backslash affect the next line.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);
 




More information about the wine-cvs mailing list