[PATCH 1/6] regedit/tests: Delete the test registry key before starting each test
Hugh McMaster
hugh.mcmaster at outlook.com
Thu Aug 24 07:45:43 CDT 2017
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/regedit/tests/regedit.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index 17f7c1d826..23873cbe7f 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -1836,6 +1836,9 @@ static void test_import_with_whitespace(void)
LONG lr;
DWORD dword;
+ lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
+ ok(lr == ERROR_SUCCESS || lr == ERROR_FILE_NOT_FOUND, "RegDeleteKeyA failed: %d\n", lr);
+
exec_import_str(" REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n");
@@ -1982,6 +1985,9 @@ static void test_key_creation_and_deletion(void)
HKEY hkey, subkey;
LONG lr;
+ lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
+ ok(lr == ERROR_SUCCESS || lr == ERROR_FILE_NOT_FOUND, "RegDeleteKeyA failed: %d\n", lr);
+
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n");
@@ -2112,6 +2118,9 @@ static void test_value_deletion(void)
DWORD dword = 0x8;
BYTE hex[4] = {0x11, 0x22, 0x33, 0x44};
+ lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
+ ok(lr == ERROR_SUCCESS || lr == ERROR_FILE_NOT_FOUND, "RegDeleteKeyA failed: %d\n", lr);
+
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n");
--
2.14.1
More information about the wine-patches
mailing list