Hugh McMaster : regedit/tests: Add tests to determine the effects of backslashes in hex data.

Alexandre Julliard julliard at winehq.org
Fri Jun 23 13:08:00 CDT 2017


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri Jun 23 11:16:58 2017 +0000

regedit/tests: Add tests to determine the effects of backslashes in hex data.

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

---

 programs/regedit/tests/regedit.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index c70cccc..0cb2959 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -480,6 +480,12 @@ static void test_basic_import(void)
                     "\"Wine15\"=hex(2):25,50,41,54,48,25,00,\n\n");
     verify_reg(hkey, "Wine15", REG_EXPAND_SZ, "%PATH%", 7, 0);
 
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Wine16\"=hex(2):\\\n"
+                    "  25,48,4f,4d,45,25,00\n\n");
+    verify_reg(hkey, "Wine16", REG_EXPAND_SZ, "%HOME%", 7, 0);
+
     RegCloseKey(hkey);
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
@@ -823,6 +829,35 @@ static void test_invalid_import(void)
     verify_reg_nonexist(hkey, "Wine22a");
     verify_reg_nonexist(hkey, "Wine22b");
 
+    /* Test the effect of backslashes in hex data */
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Wine23a\"=hex(2):25,48\\,4f,4d,45,25,00\n"
+                    "\"Wine23b\"=hex(2):25,48,\\4f,4d,45,25,00\n"
+                    "\"Wine23c\"=hex(2):25,48\\ ,4f,4d,45,25,00\n"
+                    "\"Wine23d\"=hex(2):25,48,\\ 4f,4d,45,25,00\n"
+                    "\"Wine23e\"=hex(2):\\25,48,4f,4d,45,25,00\n"
+                    "\"Wine23f\"=hex(2):\\ 25,48,4f,4d,45,25,00\n"
+                    "\"Wine23g\"=hex(2):25,48,4\\f,4d,45,25,00\n"
+                    "\"Wine23h\"=hex(2):25,48,4\\\n"
+                    "  f,4d,45,25,00\n"
+                    "\"Wine23i\"=hex(2):25,50,\\,41,54,48,25,00\n"
+                    "\"Wine23j\"=hex(2):25,48,4f,4d,45,25,5c,\\\\\n"
+                    "  25,50,41,54,48,25,00\n"
+                    "\"Wine23k\"=hex(2):,\\\n"
+                    "  25,48,4f,4d,45,25,00\n\n");
+    verify_reg_nonexist(hkey, "Wine23a");
+    verify_reg_nonexist(hkey, "Wine23b");
+    verify_reg_nonexist(hkey, "Wine23c");
+    verify_reg_nonexist(hkey, "Wine23d");
+    verify_reg_nonexist(hkey, "Wine23e");
+    verify_reg_nonexist(hkey, "Wine23f");
+    verify_reg_nonexist(hkey, "Wine23g");
+    todo_wine verify_reg_nonexist(hkey, "Wine23h");
+    verify_reg_nonexist(hkey, "Wine23i");
+    verify_reg_nonexist(hkey, "Wine23j");
+    verify_reg_nonexist(hkey, "Wine23k");
+
     RegCloseKey(hkey);
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);




More information about the wine-cvs mailing list