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

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2021-07-01 23:22:48 +10:00 committed by Alexandre Julliard
parent 5115e51adb
commit 3186a00463
6 changed files with 0 additions and 43 deletions

View File

@ -226,7 +226,6 @@ static void test_command_syntax(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg add", &r); run_reg_exe("reg add", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);

View File

@ -127,10 +127,7 @@ static void test_copy_empty_key(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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); add_key(HKEY_CURRENT_USER, COPY_SRC, 0, NULL);
@ -192,10 +189,7 @@ static void test_copy_simple_data(void)
DWORD r, dword; DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
@ -262,10 +256,7 @@ static void test_copy_complex_data(void)
DWORD r, dword; DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
@ -331,10 +322,7 @@ static void test_copy_key_order(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
add_key(hkey, "Subkey2", 0, NULL); add_key(hkey, "Subkey2", 0, NULL);
@ -356,10 +344,7 @@ static void test_copy_value_order(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
add_value(hkey, "Value 2", REG_SZ, "I was added first!", 19); 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; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Try copying empty hex values */ /* Try copying empty hex values */
add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey); add_key(HKEY_CURRENT_USER, COPY_SRC, 0, &hkey);
@ -450,10 +432,7 @@ static void test_copy_embedded_null_values(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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" test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" COPY_SRC "]\n" "[HKEY_CURRENT_USER\\" COPY_SRC "]\n"
@ -483,10 +462,7 @@ static void test_copy_slashes(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
add_key(hkey, "https://winehq.org", 0, NULL); add_key(hkey, "https://winehq.org", 0, NULL);
@ -509,10 +485,7 @@ static void test_copy_escaped_null_values(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC, 0); 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); 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_CURRENT_USER, COPY_SRC, 0, &hkey);
add_value(hkey, "Wine5a", REG_SZ, "\\0", 3); add_value(hkey, "Wine5a", REG_SZ, "\\0", 3);

View File

@ -24,7 +24,6 @@ static void test_command_syntax(void)
DWORD r; DWORD r;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg delete", &r); run_reg_exe("reg delete", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", 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; const DWORD deadbeef = 0xdeadbeef;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Create a test key */ /* Create a test key */
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
@ -184,7 +182,6 @@ static void test_registry_view_win32(void)
if (!is_win32) return; if (!is_win32) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); 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) */ /* Test deletion from the 32-bit registry view (32-bit Windows) */
create_test_key(KEY_WOW64_32KEY); create_test_key(KEY_WOW64_32KEY);
@ -257,10 +254,7 @@ static void test_registry_view_win64(void)
if (!is_win64) return; if (!is_win64) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); 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); 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) */ /* Test deletion from the 32-bit registry view (64-bit Windows) */
create_test_key(KEY_WOW64_32KEY); create_test_key(KEY_WOW64_32KEY);
@ -336,10 +330,7 @@ static void test_registry_view_wow64(void)
if (!is_wow64) return; if (!is_wow64) return;
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); 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); 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) */ /* Test deletion from the 32-bit registry view (WOW64) */
create_test_key(KEY_WOW64_32KEY); create_test_key(KEY_WOW64_32KEY);

View File

@ -177,7 +177,6 @@ static void test_export(void)
BYTE hex[4], buffer[8]; BYTE hex[4], buffer[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export", &r); run_reg_exe("reg export", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);

View File

@ -102,7 +102,6 @@ static void test_import(void)
BYTE hex[8]; BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg import", &r); run_reg_exe("reg import", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", 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]; BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_wstr("REGEDIT\n", &r); test_import_wstr("REGEDIT\n", &r);
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, 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; DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_str(" REGEDIT4\n\n" test_import_str(" REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r); "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r);
@ -3347,7 +3344,6 @@ static void test_unicode_import_with_whitespace(void)
DWORD r, dword; DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); 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" test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r); "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n", &r);

View File

@ -204,7 +204,6 @@ static void test_query(void)
BYTE buf[512]; BYTE buf[512];
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Key not present */ /* Key not present */
run_reg_exe("reg query HKCU\\" KEY_BASE, &r); run_reg_exe("reg query HKCU\\" KEY_BASE, &r);