kernel32/tests: Add additional tests for GetFileAttributesExW.
Signed-off-by: Michael Müller <michael@fds-team.de> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
This commit is contained in:
parent
83bfda7caf
commit
e0bbfc3503
|
@ -4650,6 +4650,30 @@ todo_wine
|
|||
CloseHandle(file);
|
||||
}
|
||||
|
||||
static void test_GetFileAttributesExW(void)
|
||||
{
|
||||
static const WCHAR path1[] = {'\\','\\','?','\\',0};
|
||||
static const WCHAR path2[] = {'\\','?','?','\\',0};
|
||||
static const WCHAR path3[] = {'\\','D','o','s','D','e','v','i','c','e','s','\\',0};
|
||||
WIN32_FILE_ATTRIBUTE_DATA info;
|
||||
BOOL ret;
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetFileAttributesExW(path1, GetFileExInfoStandard, &info);
|
||||
ok(!ret, "GetFileAttributesExW succeeded\n");
|
||||
todo_wine ok(GetLastError() == ERROR_INVALID_NAME, "Expected error ERROR_INVALID_NAME, got %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetFileAttributesExW(path2, GetFileExInfoStandard, &info);
|
||||
ok(!ret, "GetFileAttributesExW succeeded\n");
|
||||
ok(GetLastError() == ERROR_INVALID_NAME, "Expected error ERROR_INVALID_NAME, got %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetFileAttributesExW(path3, GetFileExInfoStandard, &info);
|
||||
ok(!ret, "GetFileAttributesExW succeeded\n");
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError());
|
||||
}
|
||||
|
||||
START_TEST(file)
|
||||
{
|
||||
InitFunctionPointers();
|
||||
|
@ -4706,4 +4730,5 @@ START_TEST(file)
|
|||
test_GetFinalPathNameByHandleA();
|
||||
test_GetFinalPathNameByHandleW();
|
||||
test_SetFileInformationByHandle();
|
||||
test_GetFileAttributesExW();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue