advapi32: add RegUnLoadKey test

James Hawkins truiken at gmail.com
Mon Apr 18 17:37:28 CDT 2005


Hi,

This also has the benefit of correctly removing the loaded key. 
Trying to delete a key created with RegLoadKey doesn't work in
windows.

Changelog
* Add RegUnLoadKey test

-- 
James Hawkins
-------------- next part --------------
Index: dlls/advapi32/tests/registry.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/tests/registry.c,v
retrieving revision 1.21
diff -u -p -r1.21 registry.c
--- dlls/advapi32/tests/registry.c	18 Apr 2005 09:52:40 -0000	1.21
+++ dlls/advapi32/tests/registry.c	18 Apr 2005 22:35:32 -0000
@@ -382,7 +382,16 @@ static void test_reg_load_key()
     ret = RegOpenKey(HKEY_LOCAL_MACHINE, "Test", &hkHandle);
     ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
 
-    delete_key(hkHandle);
+    RegCloseKey(hkHandle);
+}
+
+static void test_reg_unload_key()
+{
+    DWORD ret;
+
+    ret = RegUnLoadKey(HKEY_LOCAL_MACHINE, "Test");
+    ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
+
     DeleteFile("saved_key");
 }
 
@@ -397,6 +406,7 @@ START_TEST(registry)
     test_reg_delete_key();
     test_reg_save_key();
     test_reg_load_key();
+    test_reg_unload_key();
 
     /* cleanup */
     delete_key( hkey_main );


More information about the wine-patches mailing list