[PATCH] shlwapi/tests: Fix a test on Vista

Detlef Riekenberg wine.dev at web.de
Wed Sep 17 11:09:46 CDT 2008


---
 dlls/shlwapi/tests/shreg.c |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c
index 5b45fad..873c196 100644
--- a/dlls/shlwapi/tests/shreg.c
+++ b/dlls/shlwapi/tests/shreg.c
@@ -320,14 +320,20 @@ static void test_SHCopyKey(void)
 	}
 
 
-	if (pSHCopyKeyA)
-        {
-                dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
-                ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
-        }
+    dwRet = ERROR_SUCCESS;
+    if (pSHCopyKeyA)
+    {
+        dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
+        ok ( ERROR_SUCCESS == dwRet || ERROR_ACCESS_DENIED == dwRet,
+            "Copy failed, ret=(%u)\n", dwRet);
+    }
 
-	RegCloseKey(hKeySrc);
-	RegCloseKey(hKeyDst);
+    RegCloseKey(hKeySrc);
+    RegCloseKey(hKeyDst);
+    if (dwRet != ERROR_SUCCESS) {
+        skip("failed to copy all entries\n");
+        return;
+    }
 
         /* Check we copied the sub keys, i.e. something that's on every windows system (including Wine) */
 	hKeyDst = NULL;
-- 
1.5.4.3


--=-7DnjcTdXCNEUGRxgByrW--




More information about the wine-patches mailing list