From ec0043f0839d6a9b617858ce8512194805d5754f Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Tue, 27 Jun 2017 12:37:12 +0000 Subject: [PATCH] regedit/tests: Test whether EOF invalidates a hex data line ending in a backslash. Signed-off-by: Hugh McMaster Signed-off-by: Alexandre Julliard --- programs/regedit/tests/regedit.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 79213c6937f..fec6e3e2263 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -486,6 +486,15 @@ static void test_basic_import(void) " 25,48,4f,4d,45,25,00\n\n"); verify_reg(hkey, "Wine16", REG_EXPAND_SZ, "%HOME%", 7, 0); + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine62a\"=hex(7):4c,69,6e,65,20,\\"); + lr = RegQueryValueExA(hkey, "Wine62a", NULL, NULL, NULL, NULL); + todo_wine ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND) /* WinXP */, + "got %u, expected 0\n", lr); + if (lr == ERROR_SUCCESS) + todo_wine verify_reg(hkey, "Wine62a", REG_MULTI_SZ, "Line ", 6, 0); + RegCloseKey(hkey); lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE); @@ -1021,6 +1030,11 @@ static void test_invalid_import(void) verify_reg_nonexist(hkey, "Wine30a"); verify_reg_nonexist(hkey, "Wine30b"); + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" + "\"Wine62b\"=hex(7):4c,69,6e,65,20\\"); + verify_reg_nonexist(hkey, "Wine62b"); + RegCloseKey(hkey); lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);