[PATCH 8/8] regedit/tests: Test whether EOF invalidates a hex data line ending in a backslash

Hugh McMaster hugh.mcmaster at outlook.com
Tue Jun 27 07:37:12 CDT 2017


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/regedit/tests/regedit.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index 79213c6937..fec6e3e226 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -486,6 +486,15 @@ static void test_basic_import(void)
                     "  25,48,4f,4d,45,25,00\n\n");
     verify_reg(hkey, "Wine16", REG_EXPAND_SZ, "%HOME%", 7, 0);
 
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Wine62a\"=hex(7):4c,69,6e,65,20,\\");
+    lr = RegQueryValueExA(hkey, "Wine62a", NULL, NULL, NULL, NULL);
+    todo_wine ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND) /* WinXP */,
+                 "got %u, expected 0\n", lr);
+    if (lr == ERROR_SUCCESS)
+        todo_wine verify_reg(hkey, "Wine62a", REG_MULTI_SZ, "Line ", 6, 0);
+
     RegCloseKey(hkey);
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
@@ -1021,6 +1030,11 @@ static void test_invalid_import(void)
     verify_reg_nonexist(hkey, "Wine30a");
     verify_reg_nonexist(hkey, "Wine30b");
 
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Wine62b\"=hex(7):4c,69,6e,65,20\\");
+    verify_reg_nonexist(hkey, "Wine62b");
+
     RegCloseKey(hkey);
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
-- 
2.11.0




More information about the wine-patches mailing list