Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/regedit/tests/regedit.c | 34 ++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index ad9e0a2bffb..34acd18228b 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -1649,7 +1649,7 @@ static void test_invalid_import(void) ""Wine33c"="Value1\0\n" ""Wine33d"="Value2\0\0\0\0\n" ""Wine33e"="Value3\0Value4\n" - ""Wine33f"="\0Value4\n\n"); + ""Wine33f"="\0Value5\n\n"); verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33c"); @@ -1657,6 +1657,21 @@ static void test_invalid_import(void) verify_reg_nonexist(hkey, "Wine33e"); verify_reg_nonexist(hkey, "Wine33f");
+ exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine34a"="\0"\n" + ""Wine34b"="\0\0"\n" + ""Wine34c"="Value1\0"\n" + ""Wine34d"="Value2\0\0\0\0"\n" + ""Wine34e"="Value3\0Value4"\n" + ""Wine34f"="\0Value5"\n\n"); + todo_wine verify_reg_nonexist(hkey, "Wine34a"); + todo_wine verify_reg_nonexist(hkey, "Wine34b"); + todo_wine verify_reg_nonexist(hkey, "Wine34c"); + todo_wine verify_reg_nonexist(hkey, "Wine34d"); + todo_wine verify_reg_nonexist(hkey, "Wine34e"); + todo_wine verify_reg_nonexist(hkey, "Wine34f"); + close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE); @@ -2160,7 +2175,7 @@ static void test_invalid_import_unicode(void) ""Wine33c"="Value1\0\n" ""Wine33d"="Value2\0\0\0\0\n" ""Wine33e"="Value3\0Value4\n" - ""Wine33f"="\0Value4\n\n"); + ""Wine33f"="\0Value5\n\n"); verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33c"); @@ -2168,6 +2183,21 @@ static void test_invalid_import_unicode(void) verify_reg_nonexist(hkey, "Wine33e"); verify_reg_nonexist(hkey, "Wine33f");
+ exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine34a"="\0"\n" + ""Wine34b"="\0\0"\n" + ""Wine34c"="Value1\0"\n" + ""Wine34d"="Value2\0\0\0\0"\n" + ""Wine34e"="Value3\0Value4"\n" + ""Wine34f"="\0Value5"\n\n"); + todo_wine verify_reg_nonexist(hkey, "Wine34a"); + todo_wine verify_reg_nonexist(hkey, "Wine34b"); + todo_wine verify_reg_nonexist(hkey, "Wine34c"); + todo_wine verify_reg_nonexist(hkey, "Wine34d"); + todo_wine verify_reg_nonexist(hkey, "Wine34e"); + todo_wine verify_reg_nonexist(hkey, "Wine34f"); + close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE);