advpack/tests: Skip inf install tests if the user doesn't have admin rights.

Hans Leidekker hans at codeweavers.com
Mon Dec 19 04:38:49 CST 2016


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/advpack/tests/advpack.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c
index f7ac66b..d595876 100644
--- a/dlls/advpack/tests/advpack.c
+++ b/dlls/advpack/tests/advpack.c
@@ -337,7 +337,7 @@ static void translateinfstringex_test(void)
     }
 
     create_inf_file();
-    
+
     /* need to see if there are any flags */
 
     /* try a NULL filename */
@@ -424,6 +424,12 @@ static void translateinfstringex_test(void)
 
     /* open the inf with the install section */
     hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL);
+    if (hr == E_FAIL)
+    {
+        skip("can't open engine with install section (needs admin rights)\n");
+        DeleteFileA(inf_file);
+        return;
+    }
     ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
 
     /* translate the string with the install section specified */
-- 
2.1.4




More information about the wine-patches mailing list