regedit/tests: Add some REG_SZ import tests.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-04-12 13:45:11 +00:00 committed by Alexandre Julliard
parent 66fd733990
commit 5af62255ef
1 changed files with 27 additions and 0 deletions

View File

@ -236,6 +236,11 @@ static void test_basic_import(void)
"\"With=Equals\"=\"asdf\"\n");
verify_reg(hkey, "With=Equals", REG_SZ, "asdf", 5, 0);
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"
@ -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);
@ -651,6 +667,17 @@ static void test_comments(void)
verify_reg_nonexist(hkey, "Wine25c");
verify_reg_nonexist(hkey, "Wine25d");
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"