Commit b2a8a089 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

scrrun/tests: Use a writable location for folder creation test.

parent fac1c0d2
......@@ -127,19 +127,26 @@ static void test_interfaces(void)
static void test_createfolder(void)
{
WCHAR pathW[MAX_PATH], buffW[MAX_PATH];
HRESULT hr;
WCHAR pathW[MAX_PATH];
BSTR path;
IFolder *folder;
BOOL ret;
GetTempPathW(MAX_PATH, pathW);
GetTempFileNameW(pathW, NULL, 0, buffW);
DeleteFileW(buffW);
ret = CreateDirectoryW(buffW, NULL);
ok(ret, "got %d, %d\n", ret, GetLastError());
/* create existing directory */
GetCurrentDirectoryW(sizeof(pathW)/sizeof(WCHAR), pathW);
path = SysAllocString(pathW);
path = SysAllocString(buffW);
folder = (void*)0xdeabeef;
hr = IFileSystem3_CreateFolder(fs3, path, &folder);
ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
ok(folder == NULL, "got %p\n", folder);
SysFreeString(path);
RemoveDirectoryW(buffW);
}
static void test_textstream(void)
......
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