Commit 20b5c99f authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

kernel32/tests: Add tests for FindFirstFileExA with FIND_FIRST_EX_LARGE_FETCH flag.

parent 710df5fc
...@@ -2562,7 +2562,7 @@ static void test_FindNextFileA(void) ...@@ -2562,7 +2562,7 @@ static void test_FindNextFileA(void)
ok ( err == ERROR_NO_MORE_FILES, "GetLastError should return ERROR_NO_MORE_FILES\n"); 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; WIN32_FIND_DATAA search_results;
HANDLE handle; HANDLE handle;
...@@ -2579,12 +2579,17 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops) ...@@ -2579,12 +2579,17 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops)
_lclose(_lcreat("test-dir\\file2", 0)); _lclose(_lcreat("test-dir\\file2", 0));
CreateDirectoryA("test-dir\\dir1", NULL); CreateDirectoryA("test-dir\\dir1", NULL);
SetLastError(0xdeadbeef); 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) if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
win_skip("FindFirstFileExA is not implemented\n"); win_skip("FindFirstFileExA is not implemented\n");
goto cleanup; 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(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); ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName);
...@@ -4171,9 +4176,11 @@ START_TEST(file) ...@@ -4171,9 +4176,11 @@ START_TEST(file)
test_MoveFileW(); test_MoveFileW();
test_FindFirstFileA(); test_FindFirstFileA();
test_FindNextFileA(); 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 */ /* 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_LockFile();
test_file_sharing(); test_file_sharing();
test_offset_in_overlapped_structure(); test_offset_in_overlapped_structure();
......
...@@ -289,6 +289,9 @@ typedef enum _FINDEX_INFO_LEVELS ...@@ -289,6 +289,9 @@ typedef enum _FINDEX_INFO_LEVELS
FindExInfoMaxInfoLevel FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS; } FINDEX_INFO_LEVELS;
#define FIND_FIRST_EX_CASE_SENSITIVE 1
#define FIND_FIRST_EX_LARGE_FETCH 2
typedef enum _FINDEX_SEARCH_OPS typedef enum _FINDEX_SEARCH_OPS
{ {
FindExSearchNameMatch, FindExSearchNameMatch,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment