=?UTF-8?Q?Michael=20M=C3=BCller=20?=: kernel32/tests: Add additional tests for GetFileAttributesExW.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 2 09:21:49 CDT 2015
Module: wine
Branch: master
Commit: e0bbfc35037ea5d167983275929f6f254292cf33
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0bbfc35037ea5d167983275929f6f254292cf33
Author: Michael Müller <michael at fds-team.de>
Date: Fri Sep 25 13:35:36 2015 +0200
kernel32/tests: Add additional tests for GetFileAttributesExW.
Signed-off-by: Michael Müller <michael at fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
dlls/kernel32/tests/file.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index dd64c91..61ef8af 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -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();
}
More information about the wine-cvs
mailing list