[1/3] msi/tests: Skip a test if the current user has insufficient rights.

Hans Leidekker hans at codeweavers.com
Mon Jul 26 05:09:12 CDT 2010


---
 dlls/msi/tests/msi.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 06f85b5..dc023f4 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -297,6 +297,13 @@ static void test_null(void)
     }
 
     r = RegSetValueA(hkey, NULL, REG_SZ, "test", strlen("test"));
+    if (r == ERROR_ACCESS_DENIED)
+    {
+        skip("Not enough rights to perform tests\n");
+        HeapFree(GetProcessHeap(), 0, lpData);
+        RegCloseKey(hkey);
+        return;
+    }
     ok( r == ERROR_SUCCESS, "wrong error %d\n", r);
 
     r = MsiGetProductInfoA("", "", NULL, NULL);
-- 
1.7.0.4







More information about the wine-patches mailing list