Hugh McMaster : advapi32/tests: Add tests for deleting the default value.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 1 10:44:07 CST 2016
Module: wine
Branch: master
Commit: 50c5a2ce2e5122d8d00759e0d7926829571a4395
URL: http://source.winehq.org/git/wine.git/?a=commit;h=50c5a2ce2e5122d8d00759e0d7926829571a4395
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Tue Mar 1 22:23:47 2016 +1100
advapi32/tests: Add tests for deleting the default value.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/advapi32/tests/registry.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 5bc129c..d37042f 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -3326,6 +3326,19 @@ static void test_delete_value(void)
res = RegDeleteValueA( hkey_main, longname );
ok(res == ERROR_FILE_NOT_FOUND || broken(res == ERROR_MORE_DATA), /* nt4, win2k */
"expect ERROR_FILE_NOT_FOUND, got %i\n", res);
+
+ /* Default registry value */
+ res = RegSetValueExA(hkey_main, "", 0, REG_SZ, (const BYTE *)"value", 6);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res);
+
+ res = RegQueryValueExA(hkey_main, "", NULL, NULL, NULL, NULL);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res);
+
+ res = RegDeleteValueA(hkey_main, "" );
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res);
+
+ res = RegQueryValueExA(hkey_main, "", NULL, NULL, NULL, NULL);
+ ok(res == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", res);
}
static void test_delete_key_value(void)
@@ -3374,6 +3387,19 @@ static void test_delete_key_value(void)
ret = RegQueryValueExA(subkey, "test", NULL, NULL, NULL, NULL);
ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret);
+ /* Default registry value */
+ ret = RegSetValueExA(subkey, "", 0, REG_SZ, (const BYTE *)"value", 6);
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ ret = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL);
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ ret = pRegDeleteKeyValueA(hkey_main, "Subkey1", "" );
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ ret = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL);
+ ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret);
+
RegDeleteKeyA(subkey, "");
RegCloseKey(subkey);
}
More information about the wine-cvs
mailing list