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>
This commit is contained in:
Hugh McMaster 2016-10-24 11:27:37 +00:00 committed by Alexandre Julliard
parent 4e43d76751
commit 5027f01a6a
1 changed files with 33 additions and 0 deletions

View File

@ -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);