Hugh McMaster : regedit/tests: Delete the test registry key before starting each test.

Alexandre Julliard julliard at winehq.org
Thu Aug 24 14:18:25 CDT 2017


Module: wine
Branch: master
Commit: b46b698e826b75a8c59891422f43297ddb53c059
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b46b698e826b75a8c59891422f43297ddb53c059

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Aug 24 12:45:43 2017 +0000

regedit/tests: Delete the test registry key before starting each test.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 17f7c1d..23873cb 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");
 




More information about the wine-cvs mailing list