kernel32: Add a test for CreateFile when using OPEN_ALWAYS on directories.

This commit is contained in:
Jeff Zaroyko 2008-12-03 17:03:26 +11:00 committed by Alexandre Julliard
parent 1669b337e4
commit f8b5aa34dc
1 changed files with 10 additions and 0 deletions

View File

@ -778,6 +778,16 @@ static void test_CreateFileW(void)
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND,
"CreateFileW on invalid VxD name returned ret=%p error=%d\n",hFile,GetLastError());
ret = CreateDirectoryW(filename, NULL);
ok(ret == TRUE, "couldn't create temporary directory\n");
hFile = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);
todo_wine ok(hFile != INVALID_HANDLE_VALUE,
"expected CreateFile to succeed on existing directory, error: %d\n", GetLastError());
CloseHandle(hFile);
ret = RemoveDirectoryW(filename);
ok(ret, "DeleteFileW: error %d\n", GetLastError());
}
static void test_GetTempFileNameA(void)