forked from Mirrors/wine-wine
scrrun/tests: Use a writable location for folder creation test.
parent
fac1c0d25b
commit
b2a8a0893f
|
@ -127,19 +127,26 @@ static void test_interfaces(void)
|
||||||
|
|
||||||
static void test_createfolder(void)
|
static void test_createfolder(void)
|
||||||
{
|
{
|
||||||
|
WCHAR pathW[MAX_PATH], buffW[MAX_PATH];
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
WCHAR pathW[MAX_PATH];
|
|
||||||
BSTR path;
|
BSTR path;
|
||||||
IFolder *folder;
|
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 */
|
/* create existing directory */
|
||||||
GetCurrentDirectoryW(sizeof(pathW)/sizeof(WCHAR), pathW);
|
path = SysAllocString(buffW);
|
||||||
path = SysAllocString(pathW);
|
|
||||||
folder = (void*)0xdeabeef;
|
folder = (void*)0xdeabeef;
|
||||||
hr = IFileSystem3_CreateFolder(fs3, path, &folder);
|
hr = IFileSystem3_CreateFolder(fs3, path, &folder);
|
||||||
ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
|
ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
|
||||||
ok(folder == NULL, "got %p\n", folder);
|
ok(folder == NULL, "got %p\n", folder);
|
||||||
SysFreeString(path);
|
SysFreeString(path);
|
||||||
|
RemoveDirectoryW(buffW);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_textstream(void)
|
static void test_textstream(void)
|
||||||
|
|
Loading…
Reference in New Issue