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

oldstable
Nikolay Sivov 2014-03-10 15:03:15 +04:00 committed by Alexandre Julliard
parent fac1c0d25b
commit b2a8a0893f
1 changed files with 10 additions and 3 deletions

View File

@ -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)