Module: wine Branch: master Commit: 5027f01a6a6bfde440c1427ade69cefe1627c950 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5027f01a6a6bfde440c1427ade...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Mon Oct 24 11:27:37 2016 +0000
regedit/tests: Add line break and complexity tests.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/regedit/tests/regedit.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index eeff9d8..9692c06 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -236,6 +236,39 @@ 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" + ""Line1"="Value1"\n\n" + ""Line2"="Value2"\n\n\n" + ""Line3"="Value3"\n\n\n\n" + ""Line4"="Value4"\n\n"); + verify_reg(hkey, "Line1", REG_SZ, "Value1", 7, 0); + todo_wine verify_reg(hkey, "Line2", REG_SZ, "Value2", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + todo_wine verify_reg(hkey, "Line3", REG_SZ, "Value3", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + todo_wine verify_reg(hkey, "Line4", REG_SZ, "Value4", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine1"=dword:00000782\n\n" + ""Wine2"="Test Value"\n" + ""Wine3"=hex(7):4c,69,6e,65,20,\ + 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n" + "#comment\n" + "@="Test"\n" + ";comment\n\n" + ""Wine4"=dword:12345678\n\n"); + dword = 0x782; + verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); + todo_wine verify_reg(hkey, "Wine2", REG_SZ, "Test Value", 11, + TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + todo_wine verify_reg(hkey, "Wine3", REG_MULTI_SZ, "Line concatenation\0", 20, + TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + todo_wine verify_reg(hkey, "", REG_SZ, "Test", 5, + TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + dword = 0x12345678; + todo_wine verify_reg(hkey, "Wine4", REG_DWORD, &dword, sizeof(dword), + TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + RegCloseKey(hkey);
lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);