Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/reg/tests/add.c | 13 ++++---- programs/reg/tests/copy.c | 36 ++++++++++----------- programs/reg/tests/delete.c | 6 ++-- programs/reg/tests/export.c | 2 +- programs/reg/tests/import.c | 60 +++++++++++++++++------------------ programs/reg/tests/query.c | 2 +- programs/reg/tests/reg_test.h | 4 +-- 7 files changed, 61 insertions(+), 62 deletions(-)
diff --git a/programs/reg/tests/add.c b/programs/reg/tests/add.c index 112ae5b875d..c2548e45f37 100644 --- a/programs/reg/tests/add.c +++ b/programs/reg/tests/add.c @@ -109,14 +109,13 @@ void verify_key_(const char *file, unsigned line, HKEY root, const char *path, R RegCloseKey(hkey); }
-void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char *subkey) +void verify_key_nonexist_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam) { HKEY hkey; LONG err;
- err = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey); - lok(err == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %d, expected 2\n", - subkey, err); + err = RegOpenKeyExA(root, path, 0, KEY_READ|sam, &hkey); + lok(err == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %d, expected 2\n", path, err);
if (hkey) RegCloseKey(hkey); @@ -221,7 +220,7 @@ static void test_command_syntax(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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); @@ -287,11 +286,11 @@ static void test_key_formats(void)
run_reg_exe("reg add \HKCU\" KEY_BASE "\keytest0 /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); - verify_key_nonexist(hkey, "keytest0"); + verify_key_nonexist(hkey, "keytest0", 0);
run_reg_exe("reg add \\HKCU\" KEY_BASE "\keytest1 /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); - verify_key_nonexist(hkey, "keytest1"); + verify_key_nonexist(hkey, "keytest1", 0);
run_reg_exe("reg add HKCU\" KEY_BASE "\keytest2\\ /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), diff --git a/programs/reg/tests/copy.c b/programs/reg/tests/copy.c index f25d520bdf6..5573dd58acc 100644 --- a/programs/reg/tests/copy.c +++ b/programs/reg/tests/copy.c @@ -127,10 +127,10 @@ static void test_copy_empty_key(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, NULL);
@@ -192,10 +192,10 @@ static void test_copy_simple_data(void) DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey);
@@ -262,10 +262,10 @@ static void test_copy_complex_data(void) DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey);
@@ -331,10 +331,10 @@ static void test_copy_key_order(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey); add_key(hkey, "Subkey2", NULL); @@ -356,10 +356,10 @@ static void test_copy_value_order(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey); add_value(hkey, "Value 2", REG_SZ, "I was added first!", 19); @@ -381,10 +381,10 @@ static void test_copy_hex_data(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
/* Try copying empty hex values */ add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey); @@ -450,10 +450,10 @@ static void test_copy_embedded_null_values(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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 +483,10 @@ static void test_copy_slashes(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey); add_key(hkey, "https://winehq.org", NULL); @@ -509,10 +509,10 @@ static void test_copy_escaped_null_values(void) DWORD r;
delete_tree(HKEY_CURRENT_USER, COPY_SRC); - verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC); + verify_key_nonexist(HKEY_CURRENT_USER, COPY_SRC, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
add_key(HKEY_CURRENT_USER, COPY_SRC, &hkey); add_value(hkey, "Wine5a", REG_SZ, "\0", 3); diff --git a/programs/reg/tests/delete.c b/programs/reg/tests/delete.c index ef106e67169..e84d78808ca 100644 --- a/programs/reg/tests/delete.c +++ b/programs/reg/tests/delete.c @@ -26,7 +26,7 @@ static void test_delete(void) const DWORD deadbeef = 0xdeadbeef;
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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); @@ -97,7 +97,7 @@ static void test_delete(void)
run_reg_exe("reg delete HKCU\" KEY_BASE "\https://winehq.org /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "https://winehq.org"); + verify_key_nonexist(hkey, "https://winehq.org", 0);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v count/up /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); @@ -127,7 +127,7 @@ static void test_delete(void)
run_reg_exe("reg delete HKCU\" KEY_BASE " /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); diff --git a/programs/reg/tests/export.c b/programs/reg/tests/export.c index b45660a0e6e..24a5dbd2405 100644 --- a/programs/reg/tests/export.c +++ b/programs/reg/tests/export.c @@ -177,7 +177,7 @@ static void test_export(void) BYTE hex[4], buffer[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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); diff --git a/programs/reg/tests/import.c b/programs/reg/tests/import.c index 54a59c1edb2..c8a6b079a6a 100644 --- a/programs/reg/tests/import.c +++ b/programs/reg/tests/import.c @@ -79,7 +79,7 @@ static void test_import(void) BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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); @@ -695,13 +695,13 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "\\n" "Subkey1]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1"); + verify_key_nonexist(hkey, "Subkey1", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\n" "\Subkey2]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey2"); + verify_key_nonexist(hkey, "Subkey2", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" @@ -875,22 +875,22 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "HKEY_CURRENT_USER\" KEY_BASE "\No_Opening_Bracket]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "No_Opening_Bracket"); + verify_key_nonexist(hkey, "No_Opening_Bracket", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\No_Closing_Bracket\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "No_Closing_Bracket"); + verify_key_nonexist(hkey, "No_Closing_Bracket", 0);
test_import_str("REGEDIT4\n\n" "[ HKEY_CURRENT_USER\" KEY_BASE "\Subkey1a]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1a"); + verify_key_nonexist(hkey, "Subkey1a", 0);
test_import_str("REGEDIT4\n\n" "[\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey1b]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1b"); + verify_key_nonexist(hkey, "Subkey1b", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1c ]\n", &r); @@ -972,8 +972,8 @@ static void test_import(void) "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey2a"); - verify_key_nonexist(hkey, "Subkey2b"); + verify_key_nonexist(hkey, "Subkey2a", 0); + verify_key_nonexist(hkey, "Subkey2b", 0);
/* Test case sensitivity when creating and deleting registry keys. */ test_import_str("REGEDIT4\n\n" @@ -987,8 +987,8 @@ static void test_import(void) "[-HKEY_current_USER\" KEY_BASE "\sUBKEY3A]\n\n" "[-hKeY_cUrReNt_UsEr\" KEY_BASE "\sUbKeY3B]\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey3a"); - verify_key_nonexist(hkey, "Subkey3b"); + verify_key_nonexist(hkey, "Subkey3a", 0); + verify_key_nonexist(hkey, "Subkey3b", 0);
/* Test mixed key creation and deletion. We start by creating a subkey. */ test_import_str("REGEDIT4\n\n" @@ -1001,7 +1001,7 @@ static void test_import(void) "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n" ""Wine46a"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey4a"); + verify_key_nonexist(hkey, "Subkey4a", 0); verify_reg_nonexist(hkey, "Wine46a");
test_import_str("REGEDIT4\n\n" @@ -1009,7 +1009,7 @@ static void test_import(void) "[HKEY_CURRENT_USERS\" KEY_BASE "\Subkey4b]\n" ""Wine46b"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey4b"); + verify_key_nonexist(hkey, "Subkey4b", 0); verify_reg_nonexist(hkey, "Wine46b");
/* Test value deletion. We start by creating some registry values. */ @@ -1173,7 +1173,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54a"); - verify_key_nonexist(hkey, "Subkey1"); + verify_key_nonexist(hkey, "Subkey1", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" @@ -1632,7 +1632,7 @@ static void test_unicode_import(void) BYTE hex[8];
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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 */, @@ -2234,13 +2234,13 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "\\n" "Subkey1]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1"); + verify_key_nonexist(hkey, "Subkey1", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\n" "\Subkey2]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey2"); + verify_key_nonexist(hkey, "Subkey2", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" @@ -2414,22 +2414,22 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "HKEY_CURRENT_USER\" KEY_BASE "\No_Opening_Bracket]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "No_Opening_Bracket"); + verify_key_nonexist(hkey, "No_Opening_Bracket", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\No_Closing_Bracket\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "No_Closing_Bracket"); + verify_key_nonexist(hkey, "No_Closing_Bracket", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[ HKEY_CURRENT_USER\" KEY_BASE "\Subkey1a]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1a"); + verify_key_nonexist(hkey, "Subkey1a", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey1b]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey1b"); + verify_key_nonexist(hkey, "Subkey1b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1c ]\n", &r); @@ -2511,8 +2511,8 @@ static void test_unicode_import(void) "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey2a"); - verify_key_nonexist(hkey, "Subkey2b"); + verify_key_nonexist(hkey, "Subkey2a", 0); + verify_key_nonexist(hkey, "Subkey2b", 0);
/* Test case sensitivity when creating and deleting registry keys. */ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2526,8 +2526,8 @@ static void test_unicode_import(void) "[-HKEY_current_USER\" KEY_BASE "\sUBKEY3A]\n\n" "[-hKeY_cUrReNt_UsEr\" KEY_BASE "\sUbKeY3B]\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey3a"); - verify_key_nonexist(hkey, "Subkey3b"); + verify_key_nonexist(hkey, "Subkey3a", 0); + verify_key_nonexist(hkey, "Subkey3b", 0);
/* Test mixed key creation and deletion. We start by creating a subkey. */ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2540,7 +2540,7 @@ static void test_unicode_import(void) "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n" ""Wine46a"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey4a"); + verify_key_nonexist(hkey, "Subkey4a", 0); verify_reg_nonexist(hkey, "Wine46a");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2548,7 +2548,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USERS\" KEY_BASE "\Subkey4b]\n" ""Wine46b"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - verify_key_nonexist(hkey, "Subkey4b"); + verify_key_nonexist(hkey, "Subkey4b", 0); verify_reg_nonexist(hkey, "Wine46b");
/* Test value deletion. We start by creating some registry values. */ @@ -2715,7 +2715,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1]\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54a"); - verify_key_nonexist(hkey, "Subkey1"); + verify_key_nonexist(hkey, "Subkey1", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" @@ -3178,7 +3178,7 @@ static void test_import_with_whitespace(void) DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
test_import_str(" REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n", &r); @@ -3324,7 +3324,7 @@ static void test_unicode_import_with_whitespace(void) DWORD r, dword;
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + 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); diff --git a/programs/reg/tests/query.c b/programs/reg/tests/query.c index 76186794f5e..4754c2bf05f 100644 --- a/programs/reg/tests/query.c +++ b/programs/reg/tests/query.c @@ -165,7 +165,7 @@ static void test_query(void) BYTE buf[512];
delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); + verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg query", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); diff --git a/programs/reg/tests/reg_test.h b/programs/reg/tests/reg_test.h index 7cf3f86014d..81badf928ba 100644 --- a/programs/reg/tests/reg_test.h +++ b/programs/reg/tests/reg_test.h @@ -55,8 +55,8 @@ void close_key_(const char *file, unsigned line, HKEY hkey); #define verify_key(r,p,s) verify_key_(__FILE__,__LINE__,r,p,s) void verify_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam);
-#define verify_key_nonexist(k,s) verify_key_nonexist_(__FILE__,__LINE__,k,s) -void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char *subkey); +#define verify_key_nonexist(r,p,s) verify_key_nonexist_(__FILE__,__LINE__,r,p,s) +void verify_key_nonexist_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam);
#define add_key(k,p,s) add_key_(__FILE__,__LINE__,k,p,s) void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path, HKEY *subkey);