mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
tst: winfsp-tests: stream_getstreaminfo_test
This commit is contained in:
parent
bfc7fc5dec
commit
748c9b6409
@ -1645,6 +1645,8 @@ static void stream_getstreaminfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInf
|
||||
Success = FindNextStreamW(Handle, &FindData);
|
||||
ASSERT(!Success);
|
||||
ASSERT(ERROR_HANDLE_EOF == GetLastError());
|
||||
Success = FindClose(Handle);
|
||||
ASSERT(Success);
|
||||
|
||||
StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\file5",
|
||||
Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs));
|
||||
@ -1683,6 +1685,43 @@ static void stream_getstreaminfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInf
|
||||
Success = FindClose(Handle);
|
||||
ASSERT(Success);
|
||||
|
||||
StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\file5:s50",
|
||||
Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs));
|
||||
Handle = FindFirstStreamW(FilePath, FindStreamInfoStandard, &FindData, 0);
|
||||
ASSERT(INVALID_HANDLE_VALUE != Handle);
|
||||
|
||||
FileCount = FileTotal = 0;
|
||||
do
|
||||
{
|
||||
unsigned long ul;
|
||||
wchar_t *endp;
|
||||
|
||||
if (1 > FileCount)
|
||||
{
|
||||
FileCount++;
|
||||
ASSERT(0 == wcscmp(FindData.cStreamName, L"::$DATA"));
|
||||
continue;
|
||||
}
|
||||
|
||||
ASSERT(0 == wcsncmp(FindData.cStreamName, L":s", 2));
|
||||
ul = wcstoul(FindData.cStreamName + 2, &endp, 10);
|
||||
ASSERT(0 != ul);
|
||||
ASSERT(L':' == *endp);
|
||||
|
||||
FileCount++;
|
||||
FileTotal += ul;
|
||||
|
||||
if (0 < SleepTimeout && 5 == FileCount)
|
||||
Sleep(SleepTimeout);
|
||||
} while (FindNextStreamW(Handle, &FindData));
|
||||
ASSERT(ERROR_HANDLE_EOF == GetLastError());
|
||||
|
||||
ASSERT(101 == FileCount);
|
||||
ASSERT(101 * 100 / 2 == FileTotal);
|
||||
|
||||
Success = FindClose(Handle);
|
||||
ASSERT(Success);
|
||||
|
||||
StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\dir1",
|
||||
Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs));
|
||||
Handle = FindFirstStreamW(FilePath, FindStreamInfoStandard, &FindData, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user