Commit a89bd3f5 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

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

parent cf9f4dfa
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment