Module: wine Branch: master Commit: a31f070adaf8e3ecd3c42e651054ac09a1d1fe58 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a31f070adaf8e3ecd3c42e6510...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Tue Jun 27 12:31:08 2017 +0000
regedit/tests: Test line concatenation with comments, new lines and comma variations before a new default registry value.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/regedit/tests/regedit.c | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 706b987..ba372b4 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -559,7 +559,7 @@ static void test_invalid_import(void) exec_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoEndQuote"="Asdffdsa\n"); - lr = RegOpenKeyExA(HKEY_CURRENT_USER, KEY_BASE, 0, KEY_READ, &hkey); + lr = RegOpenKeyExA(HKEY_CURRENT_USER, KEY_BASE, 0, KEY_READ|KEY_SET_VALUE, &hkey); ok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", lr); verify_reg_nonexist(hkey, "TestNoEndQuote");
@@ -961,6 +961,46 @@ static void test_invalid_import(void) verify_reg_nonexist(hkey, "Wine27i"); todo_wine verify_reg(hkey, "Wine27j", REG_EXPAND_SZ, "%PATH%", 7, 0);
+ exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine28a"=hex(2):4c,69,6e,65,20,\\n" + "@="Default value 1"\n\n"); + verify_reg_nonexist(hkey, "Wine28a"); + verify_reg_nonexist(hkey, NULL); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine28b"=hex(2):4c,69,6e,65,20,\\n" + ";comment\n" + "@="Default value 2"\n\n"); + verify_reg_nonexist(hkey, "Wine28b"); + todo_wine verify_reg_nonexist(hkey, NULL); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine28c"=hex(2):4c,69,6e,65,20,\\n" + "#comment\n" + "@="Default value 3"\n\n"); + verify_reg_nonexist(hkey, "Wine28c"); + verify_reg(hkey, NULL, REG_SZ, "Default value 3", 16, 0); + + lr = RegDeleteValueW(hkey, NULL); + ok(lr == ERROR_SUCCESS, "RegDeleteValue failed: %u\n", lr); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine28d"=hex(2):4c,69,6e,65,20,\\n\n" + "@="Default value 4"\n\n"); + todo_wine verify_reg_nonexist(hkey, "Wine28d"); + todo_wine verify_reg_nonexist(hkey, NULL); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine28e"=hex(2):4c,69,6e,65,20\\n" + "@="Default value 5"\n\n"); + verify_reg_nonexist(hkey, "Wine28e"); + verify_reg(hkey, NULL, REG_SZ, "Default value 5", 16, TODO_REG_DATA); + RegCloseKey(hkey);
lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);