mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
winfsp-tests: WIP
This commit is contained in:
parent
4ff1b1a9cb
commit
c203404672
@ -181,7 +181,7 @@
|
|||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\create-test.c" />
|
<ClCompile Include="..\..\..\tst\winfsp-tests\create-test.c" />
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\fileinfo-test.c" />
|
<ClCompile Include="..\..\..\tst\winfsp-tests\info-test.c" />
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs-test.c" />
|
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs-test.c" />
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs.cpp" />
|
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs.cpp" />
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\mount-test.c" />
|
<ClCompile Include="..\..\..\tst\winfsp-tests\mount-test.c" />
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs-test.c">
|
<ClCompile Include="..\..\..\tst\winfsp-tests\memfs-test.c">
|
||||||
<Filter>Source</Filter>
|
<Filter>Source</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\..\tst\winfsp-tests\fileinfo-test.c">
|
<ClCompile Include="..\..\..\tst\winfsp-tests\info-test.c">
|
||||||
<Filter>Source</Filter>
|
<Filter>Source</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -13,7 +13,7 @@ extern int NtfsTests;
|
|||||||
extern int WinFspDiskTests;
|
extern int WinFspDiskTests;
|
||||||
extern int WinFspNetTests;
|
extern int WinFspNetTests;
|
||||||
|
|
||||||
void getinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
|
void getfileinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
|
||||||
{
|
{
|
||||||
void *memfs = memfs_start_ex(Flags, FileInfoTimeout);
|
void *memfs = memfs_start_ex(Flags, FileInfoTimeout);
|
||||||
|
|
||||||
@ -118,27 +118,27 @@ void getinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
|
|||||||
memfs_stop(memfs);
|
memfs_stop(memfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void getinfo_test(void)
|
void getfileinfo_test(void)
|
||||||
{
|
{
|
||||||
if (NtfsTests)
|
if (NtfsTests)
|
||||||
{
|
{
|
||||||
WCHAR DirBuf[MAX_PATH] = L"\\\\?\\";
|
WCHAR DirBuf[MAX_PATH] = L"\\\\?\\";
|
||||||
GetCurrentDirectoryW(MAX_PATH - 4, DirBuf + 4);
|
GetCurrentDirectoryW(MAX_PATH - 4, DirBuf + 4);
|
||||||
getinfo_dotest(-1, DirBuf, 0);
|
getfileinfo_dotest(-1, DirBuf, 0);
|
||||||
}
|
}
|
||||||
if (WinFspDiskTests)
|
if (WinFspDiskTests)
|
||||||
{
|
{
|
||||||
getinfo_dotest(MemfsDisk, 0, 0);
|
getfileinfo_dotest(MemfsDisk, 0, 0);
|
||||||
getinfo_dotest(MemfsDisk, 0, 1000);
|
getfileinfo_dotest(MemfsDisk, 0, 1000);
|
||||||
}
|
}
|
||||||
if (WinFspNetTests)
|
if (WinFspNetTests)
|
||||||
{
|
{
|
||||||
getinfo_dotest(MemfsNet, L"\\\\memfs\\share", 0);
|
getfileinfo_dotest(MemfsNet, L"\\\\memfs\\share", 0);
|
||||||
getinfo_dotest(MemfsNet, L"\\\\memfs\\share", 1000);
|
getfileinfo_dotest(MemfsNet, L"\\\\memfs\\share", 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void getinfo_tests(void)
|
void info_tests(void)
|
||||||
{
|
{
|
||||||
TEST(getinfo_test);
|
TEST(getfileinfo_test);
|
||||||
}
|
}
|
@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||||||
TESTSUITE(timeout_tests);
|
TESTSUITE(timeout_tests);
|
||||||
TESTSUITE(memfs_tests);
|
TESTSUITE(memfs_tests);
|
||||||
TESTSUITE(create_tests);
|
TESTSUITE(create_tests);
|
||||||
TESTSUITE(getinfo_tests);
|
TESTSUITE(info_tests);
|
||||||
|
|
||||||
tlib_run_tests(argc, argv);
|
tlib_run_tests(argc, argv);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user