mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-30 19:48:38 -05:00 
			
		
		
		
	winfsp-tests: WIP
This commit is contained in:
		| @@ -13,7 +13,7 @@ extern int NtfsTests; | ||||
| extern int WinFspDiskTests; | ||||
| 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); | ||||
| 
 | ||||
| @@ -118,27 +118,27 @@ void getinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout) | ||||
|     memfs_stop(memfs); | ||||
| } | ||||
| 
 | ||||
| void getinfo_test(void) | ||||
| void getfileinfo_test(void) | ||||
| { | ||||
|     if (NtfsTests) | ||||
|     { | ||||
|         WCHAR DirBuf[MAX_PATH] = L"\\\\?\\"; | ||||
|         GetCurrentDirectoryW(MAX_PATH - 4, DirBuf + 4); | ||||
|         getinfo_dotest(-1, DirBuf, 0); | ||||
|         getfileinfo_dotest(-1, DirBuf, 0); | ||||
|     } | ||||
|     if (WinFspDiskTests) | ||||
|     { | ||||
|         getinfo_dotest(MemfsDisk, 0, 0); | ||||
|         getinfo_dotest(MemfsDisk, 0, 1000); | ||||
|         getfileinfo_dotest(MemfsDisk, 0, 0); | ||||
|         getfileinfo_dotest(MemfsDisk, 0, 1000); | ||||
|     } | ||||
|     if (WinFspNetTests) | ||||
|     { | ||||
|         getinfo_dotest(MemfsNet, L"\\\\memfs\\share", 0); | ||||
|         getinfo_dotest(MemfsNet, L"\\\\memfs\\share", 1000); | ||||
|         getfileinfo_dotest(MemfsNet, L"\\\\memfs\\share", 0); | ||||
|         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(memfs_tests); | ||||
|     TESTSUITE(create_tests); | ||||
|     TESTSUITE(getinfo_tests); | ||||
|     TESTSUITE(info_tests); | ||||
|  | ||||
|     tlib_run_tests(argc, argv); | ||||
|     return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user