5 #include <winpr/file.h>
6 #include <winpr/windows.h>
8 int TestFileDeleteFile(
int argc,
char* argv[])
12 char validA[] =
"/tmp/valid-test-file-XXXXXX";
13 char validW[] =
"/tmp/valid-test-file-XXXXXX";
14 WCHAR* validWW = NULL;
15 const char invalidA[] =
"/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
16 WCHAR invalidW[
sizeof(invalidA)] = { 0 };
18 (void)ConvertUtf8NToWChar(invalidA, ARRAYSIZE(invalidA), invalidW, ARRAYSIZE(invalidW));
23 rc = DeleteFileA(invalidA);
27 rc = DeleteFileW(invalidW);
35 rc = DeleteFileA(validA);
43 validWW = ConvertUtf8NToWCharAlloc(validW, ARRAYSIZE(validW), NULL);
45 rc = DeleteFileW(validWW);