http://newtestbot.winehq.org/JobDetails.pl?Key=1403 --- dlls/advapi32/tests/registry.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 1784118..4e74a07 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -2341,6 +2341,27 @@ static void test_classesroot(void) ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
+ /* delete subkey1 from hkcr (should point at user's classes) */ + res = RegDeleteKey(hkcr, "subkey1"); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); + + /* confirm key was removed in hkey but not hklm */ + res = RegOpenKeyExA(hkey, "subkey1", 0, KEY_READ, &hkeysub1); + ok(res == ERROR_FILE_NOT_FOUND, "test key found in user's classes: %d\n", res); + RegCloseKey(hkeysub1); + res = RegOpenKeyExA(hklm, "subkey1", 0, KEY_READ, &hklmsub1); + ok(res == ERROR_SUCCESS, "test key not found in hklm: %d\n", res); + RegCloseKey(hklmsub1); + + /* delete subkey1 from hkcr again (which should now point at hklm) */ + res = RegDeleteKey(hkcr, "subkey1"); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); + + /* confirm hkey was removed in hklm */ + res = RegOpenKeyExA(hklm, "subkey1", 0, KEY_READ, &hklmsub1); + ok(res == ERROR_FILE_NOT_FOUND, "test key found in hklm: %d\n", res); + RegCloseKey(hklmsub1); + /* final cleanup */ delete_key( hkey ); delete_key( hklm );