oleaut32/tests: Skip the test_stub() tests if we have insufficient privileges.

Francois Gouget fgouget at codeweavers.com
Mon Feb 24 16:55:23 CST 2014


---

This fixes the test when it is not run with elevated privileges on 
Windows 8/8.1 for instance.

 dlls/oleaut32/tests/typelib.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 73ec679..056b94b 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -5323,6 +5323,14 @@ static void test_stub(void)
     ok(hr == S_OK, "got %08x\n", hr);
 
     hr = RegisterTypeLib(tl, filenameW, NULL);
+    if (hr == TYPE_E_REGISTRYACCESS)
+    {
+        win_skip("Insufficient privileges to register typelib in the registry\n");
+        ITypeLib_Release(tl);
+        DeleteFileW(filenameW);
+        CoUninitialize();
+        return;
+    }
     ok(hr == S_OK, "got %08x\n", hr);
 
     ITypeLib_Release(tl);
-- 
1.8.5.3




More information about the wine-patches mailing list