Commit b76007d8 authored by Nicolas Le Cam's avatar Nicolas Le Cam Committed by Alexandre Julliard

fusion/tests: Fix a test on some platforms.

parent 7ea4fcb7
...@@ -887,6 +887,8 @@ static void test_InstallAssembly(void) ...@@ -887,6 +887,8 @@ static void test_InstallAssembly(void)
HRESULT hr; HRESULT hr;
ULONG disp; ULONG disp;
DWORD attr; DWORD attr;
char dllpath[MAX_PATH];
UINT size;
static const WCHAR empty[] = {0}; static const WCHAR empty[] = {0};
static const WCHAR noext[] = {'f','i','l','e',0}; static const WCHAR noext[] = {'f','i','l','e',0};
...@@ -940,8 +942,10 @@ static void test_InstallAssembly(void) ...@@ -940,8 +942,10 @@ static void test_InstallAssembly(void)
hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
attr = GetFileAttributes("C:\\windows\\assembly\\GAC_MSIL\\wine\\" size = GetWindowsDirectoryA(dllpath, MAX_PATH);
"1.0.0.0__2d03617b1c31e2f5/wine.dll"); strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll");
attr = GetFileAttributes(dllpath);
ok(attr != INVALID_FILE_ATTRIBUTES, "Expected assembly to exist\n"); ok(attr != INVALID_FILE_ATTRIBUTES, "Expected assembly to exist\n");
/* uninstall the assembly from the GAC */ /* uninstall the assembly from the GAC */
...@@ -955,10 +959,11 @@ static void test_InstallAssembly(void) ...@@ -955,10 +959,11 @@ static void test_InstallAssembly(void)
} }
/* FIXME: remove once UninstallAssembly is implemented */ /* FIXME: remove once UninstallAssembly is implemented */
DeleteFileA("C:\\windows\\assembly\\GAC_MSIL\\wine\\" DeleteFileA(dllpath);
"1.0.0.0__2d03617b1c31e2f5\\wine.dll"); dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0';
RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5"); RemoveDirectoryA(dllpath);
RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine"); dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0';
RemoveDirectoryA(dllpath);
DeleteFileA("test.dll"); DeleteFileA("test.dll");
DeleteFileA("wine.dll"); DeleteFileA("wine.dll");
......
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