Commit 3186a004 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

reg/tests: Don't verify key deletion after calling delete_tree().

parent 5115e51a
......@@ -226,7 +226,6 @@ static void test_command_syntax(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg add", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
......
......@@ -127,10 +127,7 @@ static void test_copy_empty_key(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, NULL);
......@@ -192,10 +189,7 @@ static void test_copy_simple_data(void)
DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
......@@ -262,10 +256,7 @@ static void test_copy_complex_data(void)
DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
......@@ -331,10 +322,7 @@ static void test_copy_key_order(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
add_key(hkey, "Subkey2", 0, NULL);
......@@ -356,10 +344,7 @@ static void test_copy_value_order(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
add_value(hkey, "Value 2", REG_SZ, "I was added first!", 19);
......@@ -381,10 +366,7 @@ static void test_copy_hex_data(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Try copying empty hex values */
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
......@@ -450,10 +432,7 @@ static void test_copy_embedded_null_values(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" COPY_SRC "]\n"
......@@ -483,10 +462,7 @@ static void test_copy_slashes(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
add_key(hkey, "https://winehq.org", 0, NULL);
......@@ -509,10 +485,7 @@ static void test_copy_escaped_null_values(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0);
verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
add_value(hkey, "Wine5a", REG_SZ, "\\0", 3);
......
......@@ -24,7 +24,6 @@ static void test_command_syntax(void)
DWORD r;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg delete", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
......@@ -85,7 +84,6 @@ static void test_delete(void)
const DWORD deadbeef = 0xdeadbeef;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Create a test key */
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
......@@ -184,7 +182,6 @@ static void test_registry_view_win32(void)
if (!is_win32) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
/* Test deletion from the 32-bit registry view (32-bit Windows) */
create_test_key(KEY_WOW64_32KEY);
......@@ -257,10 +254,7 @@ static void test_registry_view_win64(void)
if (!is_win64) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
/* Test deletion from the 32-bit registry view (64-bit Windows) */
create_test_key(KEY_WOW64_32KEY);
......@@ -336,10 +330,7 @@ static void test_registry_view_wow64(void)
if (!is_wow64) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
/* Test deletion from the 32-bit registry view (WOW64) */
create_test_key(KEY_WOW64_32KEY);
......
......@@ -177,7 +177,6 @@ static void test_export(void)
BYTE hex[4], buffer[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
......
......@@ -102,7 +102,6 @@ static void test_import(void)
BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg import", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
......@@ -1655,7 +1654,6 @@ static void test_unicode_import(void)
BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_wstr("REGEDIT\n", &r);
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */,
......@@ -3201,7 +3199,6 @@ static void test_import_with_whitespace(void)
DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_str(" REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r);
......@@ -3347,7 +3344,6 @@ static void test_unicode_import_with_whitespace(void)
DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r);
......
......@@ -204,7 +204,6 @@ static void test_query(void)
BYTE buf[512];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Key not present */
run_reg_exe("reg query HKCU\\" KEY_BASE, &r);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment