Paul Vriens : fusion/tests: Fix some test failures on systems with .NET 1.1 .

Alexandre Julliard julliard at winehq.org
Fri Feb 6 09:55:50 CST 2009


Module: wine
Branch: master
Commit: a89bd3f562276d6f938bffef30f28fb35171fa5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a89bd3f562276d6f938bffef30f28fb35171fa5b

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Fri Feb  6 08:27:08 2009 +0100

fusion/tests: Fix some test failures on systems with .NET 1.1.

---

 dlls/fusion/tests/fusion.c |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/dlls/fusion/tests/fusion.c b/dlls/fusion/tests/fusion.c
index ecdf87c..d2ed0f9 100644
--- a/dlls/fusion/tests/fusion.c
+++ b/dlls/fusion/tests/fusion.c
@@ -144,13 +144,37 @@ static void test_GetCachePath(void)
        "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
     ok_w2("Expected \"%s\",  got \"%s\"\n", nochange, path);
 
+    lstrcpyW(cachepath, windir);
+    lstrcatW(cachepath, backslash);
+    lstrcatW(cachepath, assembly);
+
+    /* ASM_CACHE_ROOT */
+    lstrcpyW(path, nochange);
+    size = MAX_PATH;
+    hr = pGetCachePath(ASM_CACHE_ROOT, path, &size);
+    ok(hr == S_OK ||
+       broken(hr == E_INVALIDARG), /* .NET 1.1 */
+       "Expected S_OK, got %08x\n", hr);
+    if (hr == S_OK)
+        ok_w2("Expected \"%s\",  got \"%s\"\n", cachepath, path);
+
     if (pGetCORVersion)
     {
         CHAR versionA[MAX_PATH];
         CHAR cachepathA[MAX_PATH];
-
-        static const CHAR nativeimgA[] = "NativeImages_";
-        static const CHAR zapfmtA[] = "%s\\%s\\%s%s_32";
+        CHAR nativeimgA[MAX_PATH];
+        CHAR zapfmtA[MAX_PATH];
+
+        if (hr == S_OK)
+        {
+            lstrcpyA(nativeimgA, "NativeImages_");
+            lstrcpyA(zapfmtA, "%s\\%s\\%s%s_32");
+        }
+        else
+        {
+            lstrcpyA(nativeimgA, "NativeImages1_");
+            lstrcpyA(zapfmtA, "%s\\%s\\%s%s");
+        }
 
         pGetCORVersion(version, MAX_PATH, &size);
         WideCharToMultiByte(CP_ACP, 0, version, -1, versionA, MAX_PATH, 0, 0);
@@ -166,17 +190,6 @@ static void test_GetCachePath(void)
         ok_w2("Expected \"%s\",  got \"%s\"\n", cachepath, path);
     }
 
-    lstrcpyW(cachepath, windir);
-    lstrcatW(cachepath, backslash);
-    lstrcatW(cachepath, assembly);
-
-    /* ASM_CACHE_ROOT */
-    lstrcpyW(path, nochange);
-    size = MAX_PATH;
-    hr = pGetCachePath(ASM_CACHE_ROOT, path, &size);
-    ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
-    ok_w2("Expected \"%s\",  got \"%s\"\n", cachepath, path);
-
     /* two flags at once */
     lstrcpyW(path, nochange);
     size = MAX_PATH;




More information about the wine-cvs mailing list