Hugh McMaster : reg/tests: Test backslashes with whitespace variations and comma placement.
Module: wine Branch: master Commit: 5e0d406120e00e8415df1fd789cfaac169f74065 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5e0d406120e00e8415df1fd789... Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Jun 27 09:05:45 2017 +0000 reg/tests: Test backslashes with whitespace variations and comma placement. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/tests/reg.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c index 6262635..5076ad1 100644 --- a/programs/reg/tests/reg.c +++ b/programs/reg/tests/reg.c @@ -1822,6 +1822,28 @@ static void test_import(void) todo_wine verify_reg_nonexist(hkey, "Wine52k"); todo_wine verify_reg(hkey, "Wine52l", REG_EXPAND_SZ, "%HOME%", 7, 0); + test_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine53a\"=hex(2):25,48,4f,4d,45,25,5c,\\\n" + " 25,50,41,54,48,25,00\n" + "\"Wine53b\"=hex(2):25,48,4f,4d,45,25,5c\\\n" + " 25,50,41,54,48,25,00\n" + "\"Wine53c\"=hex(2):25,48,4f,4d,45,25,5c, \\ ;comment\n" + " 25,50,41,54,48,25,00\n" + "\"Wine53d\"=hex(2):25,48,4f,4d,45,25,5c \\ ;comment\n" + " 25,50,41,54,48,25,00\n" + "\"Wine53e\"=hex(2):25,48,4f,4d,45,25,5c,\\\t ;comment\n" + " 25,50,41,54,48,25,00\n" + "\"Wine53f\"=hex(2):25,48,4f,4d,45,25,5c\\\t ;comment\n" + " 25,50,41,54,48,25,00\n\n", &r); + todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + todo_wine verify_reg(hkey, "Wine53a", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53b"); + todo_wine verify_reg(hkey, "Wine53c", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53d"); + todo_wine verify_reg(hkey, "Wine53e", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53f"); + err = RegCloseKey(hkey); todo_wine ok(err == ERROR_SUCCESS, "got %d, expected 0\n", err); @@ -2829,6 +2851,28 @@ static void test_unicode_import(void) todo_wine verify_reg_nonexist(hkey, "Wine52k"); todo_wine verify_reg(hkey, "Wine52l", REG_EXPAND_SZ, "%HOME%", 7, 0); + test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine53a\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00,\\\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" + "\"Wine53b\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00\\\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" + "\"Wine53c\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00, \\ ;comment\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" + "\"Wine53d\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00 \\ ;comment\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" + "\"Wine53e\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00,\\\t ;comment\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" + "\"Wine53f\"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00\\\t ;comment\n" + " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n\n", &r); + todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + todo_wine verify_reg(hkey, "Wine53a", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53b"); + todo_wine verify_reg(hkey, "Wine53c", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53d"); + todo_wine verify_reg(hkey, "Wine53e", REG_EXPAND_SZ, "%HOME%\\%PATH%", 14, 0); + todo_wine verify_reg_nonexist(hkey, "Wine53f"); + err = RegCloseKey(hkey); todo_wine ok(err == ERROR_SUCCESS, "got %d, expected 0\n", err);
participants (1)
-
Alexandre Julliard