Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/reg/tests/reg.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c index 471c6ad8d46..db02fc770e2 100644 --- a/programs/reg/tests/reg.c +++ b/programs/reg/tests/reg.c @@ -2360,7 +2360,7 @@ static void test_import(void) ""Wine69c"="Value1\0\n" ""Wine69d"="Value2\0\0\0\0\n" ""Wine69e"="Value3\0Value4\n" - ""Wine69f"="\0Value4\n\n", &r); + ""Wine69f"="\0Value5\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_reg_nonexist(hkey, "Wine69a"); verify_reg_nonexist(hkey, "Wine69b"); @@ -2369,6 +2369,22 @@ static void test_import(void) verify_reg_nonexist(hkey, "Wine69e"); verify_reg_nonexist(hkey, "Wine69f");
+ test_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine70a"="\0"\n" + ""Wine70b"="\0\0"\n" + ""Wine70c"="Value1\0"\n" + ""Wine70d"="Value2\0\0\0\0"\n" + ""Wine70e"="Value3\0Value4"\n" + ""Wine70f"="\0Value5"\n\n", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + todo_wine verify_reg_nonexist(hkey, "Wine70a"); + todo_wine verify_reg_nonexist(hkey, "Wine70b"); + todo_wine verify_reg_nonexist(hkey, "Wine70c"); + todo_wine verify_reg_nonexist(hkey, "Wine70d"); + todo_wine verify_reg_nonexist(hkey, "Wine70e"); + todo_wine verify_reg_nonexist(hkey, "Wine70f"); + close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE); @@ -3882,7 +3898,7 @@ static void test_unicode_import(void) ""Wine69c"="Value1\0\n" ""Wine69d"="Value2\0\0\0\0\n" ""Wine69e"="Value3\0Value4\n" - ""Wine69f"="\0Value4\n\n", &r); + ""Wine69f"="\0Value5\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_reg_nonexist(hkey, "Wine69a"); verify_reg_nonexist(hkey, "Wine69b"); @@ -3891,6 +3907,22 @@ static void test_unicode_import(void) verify_reg_nonexist(hkey, "Wine69e"); verify_reg_nonexist(hkey, "Wine69f");
+ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\" KEY_BASE "]\n" + ""Wine70a"="\0"\n" + ""Wine70b"="\0\0"\n" + ""Wine70c"="Value1\0"\n" + ""Wine70d"="Value2\0\0\0\0"\n" + ""Wine70e"="Value3\0Value4"\n" + ""Wine70f"="\0Value5"\n\n", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + todo_wine verify_reg_nonexist(hkey, "Wine70a"); + todo_wine verify_reg_nonexist(hkey, "Wine70b"); + todo_wine verify_reg_nonexist(hkey, "Wine70c"); + todo_wine verify_reg_nonexist(hkey, "Wine70d"); + todo_wine verify_reg_nonexist(hkey, "Wine70e"); + todo_wine verify_reg_nonexist(hkey, "Wine70f"); + close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE);