Hugh McMaster : regedit/tests: Add some REG_SZ import tests.

Alexandre Julliard julliard at winehq.org
Wed Apr 12 15:02:33 CDT 2017


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Wed Apr 12 13:45:11 2017 +0000

regedit/tests: Add some REG_SZ import tests.

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

---

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

diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index 54d20ed..9ff760a 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -238,6 +238,11 @@ static void test_basic_import(void)
 
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Empty string\"=\"\"\n\n");
+    verify_reg(hkey, "Empty string", REG_SZ, "", 1, 0);
+
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
                     "\"Line1\"=\"Value1\"\n\n"
                     "\"Line2\"=\"Value2\"\n\n\n"
                     "\"Line3\"=\"Value3\"\n\n\n\n"
@@ -541,6 +546,17 @@ static void test_invalid_import(void)
     todo_wine verify_reg_nonexist(hkey, "Test15a");
     todo_wine verify_reg_nonexist(hkey, "Test15b");
 
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Test16a\"=\n"
+                    "\"Test16b\"=\\\"\n"
+                    "\"Test16c\"=\\\"Value\\\"\n"
+                    "\"Test16d\"=\\\"Value\"\n\n");
+    verify_reg_nonexist(hkey, "Test16a");
+    verify_reg_nonexist(hkey, "Test16b");
+    verify_reg_nonexist(hkey, "Test16c");
+    verify_reg_nonexist(hkey, "Test16d");
+
     RegCloseKey(hkey);
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
@@ -653,6 +669,17 @@ static void test_comments(void)
 
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+                    "\"Wine26a\"=\"Value1\"  ;comment\n"
+                    "\"Wine26b\"=\"Value2\"\t\t;comment\n"
+                    "\"Wine26c\"=\"Value3\"  #comment\n"
+                    "\"Wine26d\"=\"Value4\"\t\t#comment\n\n");
+    todo_wine verify_reg(hkey, "Wine26a", REG_SZ, "Value1", 7, 0);
+    todo_wine verify_reg(hkey, "Wine26b", REG_SZ, "Value2", 7, 0);
+    verify_reg_nonexist(hkey, "Wine26c");
+    verify_reg_nonexist(hkey, "Wine26d");
+
+    exec_import_str("REGEDIT4\n\n"
+                    "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
                     "\"Multi-Line1\"=hex(7):4c,69,6e,65,20,\\\n"
                     "  63,6f,6e,\\;comment\n"
                     "  63,61,74,\\;comment\n"




More information about the wine-cvs mailing list