diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index bf0232a80b6..64793b7ed90 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -3393,7 +3393,9 @@ static BOOL compare_export_(unsigned line, const char *filename, const char *exp todo_wine_if (todo & TODO_REG_COMPARE) lok(!lstrcmpW(fbuf, wstr), "export data does not match expected data\n"); - ret = TRUE; + + ret = DeleteFileA(filename); + lok(ret, "DeleteFile failed: %u\n", GetLastError()); exit: HeapFree(GetProcessHeap(), 0, fbuf); @@ -3468,9 +3470,6 @@ static void test_export(void) run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n"); - lr = DeleteFileA("file.reg"); - ok(lr, "DeleteFile failed: %u\n", GetLastError()); - /* Test registry export with a simple data structure */ dword = 0x100; add_value(hkey, "DWORD", REG_DWORD, &dword, sizeof(dword)); @@ -3479,9 +3478,6 @@ static void test_export(void) run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE); ok(compare_export("file.reg", simple_test, 0), "compare_export() failed\n"); - lr = DeleteFileA("file.reg"); - ok(lr, "DeleteFile failed: %u\n", GetLastError()); - /* Test registry export with a complex data structure */ add_key(hkey, "Subkey1", &subkey); add_value(subkey, "Binary", REG_BINARY, "\x11\x22\x33\x44", 4); @@ -3519,9 +3515,6 @@ static void test_export(void) run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE); ok(compare_export("file.reg", complex_test, 0), "compare_export() failed\n"); - lr = DeleteFileA("file.reg"); - ok(lr, "DeleteFile failed: %u\n", GetLastError()); - lr = delete_tree(HKEY_CURRENT_USER, KEY_BASE); ok(lr == ERROR_SUCCESS, "delete_tree() failed: %d\n", lr); @@ -3535,9 +3528,6 @@ static void test_export(void) run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE); ok(compare_export("file.reg", key_order_test, 0), "compare_export() failed\n"); - lr = DeleteFileA("file.reg"); - ok(lr, "DeleteFile failed: %u\n", GetLastError()); - delete_key(hkey, "Subkey1"); delete_key(hkey, "Subkey2"); @@ -3552,9 +3542,6 @@ static void test_export(void) run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE); ok(compare_export("file.reg", value_order_test, TODO_REG_COMPARE), "compare_export() failed\n"); - lr = DeleteFileA("file.reg"); - ok(lr, "DeleteFile failed: %u\n", GetLastError()); - delete_key(HKEY_CURRENT_USER, KEY_BASE); }