mirror of
https://github.com/reactos/wine.git
synced 2025-02-15 10:29:19 +00:00
kernel32/tests: Add a test for CreateFileA.
This commit is contained in:
parent
fa7b5b05e2
commit
067168b67b
@ -874,6 +874,13 @@ static void test_CreateFileA(void)
|
||||
ret = DeleteFileA(filename);
|
||||
ok(ret, "DeleteFileA: error %d\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
hFile = CreateFileA("c:\\*.*", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
ok(hFile == INVALID_HANDLE_VALUE, "hFile should have been INVALID_HANDLE_VALUE\n");
|
||||
ok(GetLastError() == ERROR_INVALID_NAME ||
|
||||
broken(GetLastError() == ERROR_FILE_NOT_FOUND), /* Win98 */
|
||||
"LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %u\n", GetLastError());
|
||||
|
||||
/* get windows drive letter */
|
||||
ret = GetWindowsDirectory(windowsdir, sizeof(windowsdir));
|
||||
ok(ret < sizeof(windowsdir), "windowsdir is abnormally long!\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user