From: Sebastian Lackner Subject: [1/2] kernel32/tests: Add tests for FindFirstFileExA with FIND_FIRST_EX_LARGE_FETCH flag. Message-Id: <542D1980.6010208@fds-team.de> Date: Thu, 02 Oct 2014 11:23:12 +0200 --- dlls/kernel32/tests/file.c | 15 +++++++++++---- include/winbase.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) From 67118a31bab0659daa50347ada65451eebe584ff Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 2 Oct 2014 03:53:30 +0200 Subject: kernel32/tests: Add tests for FindFirstFileExA with FIND_FIRST_EX_LARGE_FETCH flag. --- dlls/kernel32/tests/file.c | 15 +++++++++++---- include/winbase.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index ddfa019..106e68a 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -2562,7 +2562,7 @@ static void test_FindNextFileA(void) ok ( err == ERROR_NO_MORE_FILES, "GetLastError should return ERROR_NO_MORE_FILES\n"); } -static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops) +static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops, DWORD flags) { WIN32_FIND_DATAA search_results; HANDLE handle; @@ -2579,12 +2579,17 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops) _lclose(_lcreat("test-dir\\file2", 0)); CreateDirectoryA("test-dir\\dir1", NULL); SetLastError(0xdeadbeef); - handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, search_ops, NULL, 0); + handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, search_ops, NULL, flags); if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { win_skip("FindFirstFileExA is not implemented\n"); goto cleanup; } + if ((flags & FIND_FIRST_EX_LARGE_FETCH) && handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_PARAMETER) + { + win_skip("FindFirstFileExA flag FIND_FIRST_EX_LARGE_FETCH not supported, skipping test\n"); + goto cleanup; + } ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError()); ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName); @@ -4171,9 +4176,11 @@ START_TEST(file) test_MoveFileW(); test_FindFirstFileA(); test_FindNextFileA(); - test_FindFirstFileExA(0); + test_FindFirstFileExA(0, 0); + test_FindFirstFileExA(0, FIND_FIRST_EX_LARGE_FETCH); /* FindExLimitToDirectories is ignored if the file system doesn't support directory filtering */ - test_FindFirstFileExA(FindExSearchLimitToDirectories); + test_FindFirstFileExA(FindExSearchLimitToDirectories, 0); + test_FindFirstFileExA(FindExSearchLimitToDirectories, FIND_FIRST_EX_LARGE_FETCH); test_LockFile(); test_file_sharing(); test_offset_in_overlapped_structure(); diff --git a/include/winbase.h b/include/winbase.h index dd5e816..edd6ad6 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -289,6 +289,9 @@ typedef enum _FINDEX_INFO_LEVELS FindExInfoMaxInfoLevel } FINDEX_INFO_LEVELS; +#define FIND_FIRST_EX_CASE_SENSITIVE 1 +#define FIND_FIRST_EX_LARGE_FETCH 2 + typedef enum _FINDEX_SEARCH_OPS { FindExSearchNameMatch, -- 2.1.1