ReactOS  0.4.14-dev-384-g5b37caa
FindFiles.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: Tests for the Find*File*A/W APIs.
5  * PROGRAMMER: Hermès BÉLUSCA - MAÏTO
6  */
7 
8 #include "precomp.h"
9 
10 /*
11  * NOTE: This test supposes the following requirements:
12  * - There is a disk attached to the letter "C:"
13  * - There is a Windows-like system installed in "C:<installation_directory>"
14  * which contains a sub-directory "system32"
15  * - There is no sub-directory called "foobar" in "C:\".
16  *
17  * If one of these requirements is not fulfilled, one or more tests may fail.
18  */
19 
20 static CHAR OSDirA[MAX_PATH]; // OS directory
22 static CHAR baseA[MAX_PATH]; // Current directory
24 static CHAR selfnameA[MAX_PATH]; // Path to this executable
26 static LPSTR exenameA; // Executable's name
28 static INT myARGC;
29 static LPSTR* myARGV;
30 
31 
32 /*
33  * Fixes definition of Wine's ok_err
34  */
35 #ifdef ok_err
36 #undef ok_err
37 #endif
38 
39 #define ok_err(error) \
40  ok(GetLastError() == (error), "Wrong last error. Expected %lu, got %lu\n", (DWORD)(error), GetLastError())
41 
42 
43 /*
44  * Types of tests. Define them as macros so that calling them
45  * into the code reports the actual line where they were called.
46  */
47 #define testType1_A(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename) \
48 do { \
49  ZeroMemory(&fd, sizeof(fd)); \
50  SetLastError((dwInitialError)); \
51  h = FindFirstFileA((lpFileName), &fd); \
52  ok(h == (hExpectedHandleValue), "FindFirstFileA returned 0x%p, expected 0x%p\n", h, (hExpectedHandleValue)); \
53  ok_err(dwExpectedError); \
54  if (bExpectedNullFilename) \
55  ok(fd.cFileName[0] == 0, "fd.cFileName != \"\"\n"); \
56  else \
57  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
58  FindClose(h); \
59 } while (0)
60 
61 #define testType1_W(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename) \
62 do { \
63  ZeroMemory(&fd, sizeof(fd)); \
64  SetLastError((dwInitialError)); \
65  h = FindFirstFileW((lpFileName), &fd); \
66  ok(h == (hExpectedHandleValue), "FindFirstFileW returned 0x%p, expected 0x%p\n", h, (hExpectedHandleValue)); \
67  ok_err(dwExpectedError); \
68  if (bExpectedNullFilename) \
69  ok(fd.cFileName[0] == 0, "fd.cFileName != \"\"\n"); \
70  else \
71  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
72  FindClose(h); \
73 } while (0)
74 
75 #define testType2_A(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError) \
76 do { \
77  ZeroMemory(&fd, sizeof(fd)); \
78  SetLastError((dwInitialError)); \
79  h = FindFirstFileA((lpFileName), &fd); \
80  ok(h != (hUnexpectedHandleValue), "FindFirstFileA returned 0x%p\n", h); \
81  ok_err(dwExpectedError); \
82  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
83  FindClose(h); \
84 } while (0)
85 
86 #define testType2_W(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError) \
87 do { \
88  ZeroMemory(&fd, sizeof(fd)); \
89  SetLastError((dwInitialError)); \
90  h = FindFirstFileW((lpFileName), &fd); \
91  ok(h != (hUnexpectedHandleValue), "FindFirstFileW returned 0x%p\n", h); \
92  ok_err(dwExpectedError); \
93  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
94  FindClose(h); \
95 } while (0)
96 
97 
98 static void Test_FindFirstFileA(void)
99 {
103  HANDLE h;
104 
105  /* Save the current directory */
107 
108 /*** Tests for the root directory - root directory ***/
109  /* Modify the current directory */
110  SetCurrentDirectoryA("C:\\");
111 
113 
116  testType2_A("C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
117 
120  testType2_A("\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
121 
122  /* Restore the old current directory */
124 /*****************************************************/
125 
126 /*** Tests for the root directory - long directory ***/
127  /* Modify the current directory */
128  SetCurrentDirectoryA(OSDirA); /* We expect here that OSDir is of the form: C:\OSDir */
129 
130  testType2_A("C:", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
131 
134  testType2_A("C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
135 
138  testType2_A("\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
139 
140  /* Restore the old current directory */
142 /*****************************************************/
143 
144 /*** Relative paths ***/
145  /*
146  * NOTE: This test does not give the same results if you launch the app
147  * from a root drive or from a long-form directory (of the form C:\dir).
148  */
149  // testType2_A("..", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
150  // testType1_A("..", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
151 /**********************/
152 
153 /*** Relative paths - root directory ***/
154  /* Modify the current directory */
155  SetCurrentDirectoryA("C:\\");
156 
160  testType2_A(".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
161 
165  testType2_A("..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
166 
167  /* Restore the old current directory */
169 /***************************************/
170 
171 /*** Relative paths - long directory ***/
172  /* Modify the current directory */
173  SetCurrentDirectoryA(OSDirA); /* We expect here that OSDir is of the form: C:\OSDir */
174 
175  testType2_A(".", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
176 
179  testType2_A(".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
180 
182 
185  testType2_A("..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
186 
187  /* Restore the old current directory */
189 /****************************************/
190 
191 /*** Unexisting path ***/
192  testType1_A("C:\\foobar", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
193  testType1_A("C:\\foobar\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
194  testType1_A("C:\\foobar\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
195  testType1_A("C:\\foobar\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
196  testType1_A("C:\\foobar\\system32\\..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
197 
198  /* Possibly a DOS device */
199  testType1_A("C:\\foobar\\nul", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
200  testType1_A("C:\\foobar\\nul\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
201  testType1_A("C:\\foobar\\nul\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
202  testType1_A("C:\\foobar\\nul\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
203 
204  testType1_A("C:\\foobar\\toto", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
205  testType1_A("C:\\foobar\\toto\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
206  testType1_A("C:\\foobar\\toto\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
207  testType1_A("C:\\foobar\\toto\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
208 
209  strcpy(Buffer, "C:\\foobar\\");
212 
213  strcpy(Buffer, "C:\\foobar\\.\\");
216 /***********************/
217 
218 /*** Existing path ***/
219  strcpy(Buffer, OSDirA);
220  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
221 
222  strcpy(Buffer, OSDirA);
223  strcat(Buffer, "\\");
225 
226  strcpy(Buffer, OSDirA);
227  strcat(Buffer, "\\\\");
229 
230  strcpy(Buffer, OSDirA);
231  strcat(Buffer, "\\*");
232  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
233 
234  strcpy(Buffer, OSDirA);
235  strcat(Buffer, "\\.\\*");
236  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
237 
238  strcpy(Buffer, OSDirA);
239  strcat(Buffer, "\\system32\\..\\*");
240  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
241 
242  /* Possibly a DOS device */
243  strcpy(Buffer, OSDirA);
244  strcat(Buffer, "\\nul");
245  testType1_A(Buffer, 0xdeadbeef, (HANDLE)0x00000001, 0xdeadbeef, FALSE);
246 
247  strcpy(Buffer, OSDirA);
248  strcat(Buffer, "\\nul\\");
250 
251  strcpy(Buffer, OSDirA);
252  strcat(Buffer, "\\nul\\\\");
254 
255  strcpy(Buffer, OSDirA);
256  strcat(Buffer, "\\nul\\*");
258 
259  strcpy(Buffer, OSDirA);
260  strcat(Buffer, "\\toto");
262 
263  strcpy(Buffer, OSDirA);
264  strcat(Buffer, "\\toto\\");
266 
267  strcpy(Buffer, OSDirA);
268  strcat(Buffer, "\\toto\\\\");
270 
271  strcpy(Buffer, OSDirA);
272  strcat(Buffer, "\\toto\\*");
274 
275  // strcpy(Buffer, baseA);
276  // strcat(Buffer, "\\");
277  // strcat(Buffer, exenameA);
278  // testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
279 
280  // strcpy(Buffer, baseA);
281  // strcat(Buffer, "\\.\\");
282  // strcat(Buffer, exenameA);
283  // testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
284 /*********************/
285 
286  return;
287 }
288 
289 static void Test_FindFirstFileW(void)
290 {
294  HANDLE h;
295 
296  /* Save the current directory */
298 
299 /*** Tests for the root directory - root directory ***/
300  /* Modify the current directory */
301  SetCurrentDirectoryW(L"C:\\");
302 
304 
307  testType2_W(L"C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
308 
311  testType2_W(L"\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
312 
313  /* Restore the old current directory */
315 /*****************************************************/
316 
317 /*** Tests for the root directory - long directory ***/
318  /* Modify the current directory */
319  SetCurrentDirectoryW(OSDirW); /* We expect here that OSDir is of the form: C:\OSDir */
320 
321  testType2_W(L"C:", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
322 
325  testType2_W(L"C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
326 
329  testType2_W(L"\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
330 
331  /* Restore the old current directory */
333 /*****************************************************/
334 
335 /*** Relative paths ***/
336  /*
337  * NOTE: This test does not give the same results if you launch the app
338  * from a root drive or from a long-form directory (of the form C:\dir).
339  */
340  // testType2_W(L"..", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
341  // testType1_W(L"..", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
342 /**********************/
343 
344 /*** Relative paths - root directory ***/
345  /* Modify the current directory */
346  SetCurrentDirectoryW(L"C:\\");
347 
351  testType2_W(L".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
352 
356  testType2_W(L"..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
357 
358  /* Restore the old current directory */
360 /***************************************/
361 
362 /*** Relative paths - long directory ***/
363  /* Modify the current directory */
364  SetCurrentDirectoryW(OSDirW); /* We expect here that OSDir is of the form: C:\OSDir */
365 
366  testType2_W(L".", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
367 
370  testType2_W(L".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
371 
373 
376  testType2_W(L"..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
377 
378  /* Restore the old current directory */
380 /****************************************/
381 
382 /*** Unexisting path ***/
383  testType1_W(L"C:\\foobar", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
384  testType1_W(L"C:\\foobar\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
385  testType1_W(L"C:\\foobar\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
386  testType1_W(L"C:\\foobar\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
387  testType1_W(L"C:\\foobar\\system32\\..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
388 
389  /* Possibly a DOS device */
390  testType1_W(L"C:\\foobar\\nul", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
391  testType1_W(L"C:\\foobar\\nul\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
392  testType1_W(L"C:\\foobar\\nul\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
393  testType1_W(L"C:\\foobar\\nul\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
394 
395  testType1_W(L"C:\\foobar\\toto", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
396  testType1_W(L"C:\\foobar\\toto\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
397  testType1_W(L"C:\\foobar\\toto\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
398  testType1_W(L"C:\\foobar\\toto\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
399 
400  wcscpy(Buffer, L"C:\\foobar\\");
403 
404  wcscpy(Buffer, L"C:\\foobar\\.\\");
407 /***********************/
408 
409 /*** Existing path ***/
410  wcscpy(Buffer, OSDirW);
411  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
412 
413  wcscpy(Buffer, OSDirW);
414  wcscat(Buffer, L"\\");
416 
417  wcscpy(Buffer, OSDirW);
418  wcscat(Buffer, L"\\\\");
420 
421  wcscpy(Buffer, OSDirW);
422  wcscat(Buffer, L"\\*");
423  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
424 
425  wcscpy(Buffer, OSDirW);
426  wcscat(Buffer, L"\\.\\*");
427  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
428 
429  wcscpy(Buffer, OSDirW);
430  wcscat(Buffer, L"\\system32\\..\\*");
431  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
432 
433  /* Possibly a DOS device */
434  wcscpy(Buffer, OSDirW);
435  wcscat(Buffer, L"\\nul");
436  testType1_W(Buffer, 0xdeadbeef, (HANDLE)0x00000001, 0xdeadbeef, FALSE);
437 
438  wcscpy(Buffer, OSDirW);
439  wcscat(Buffer, L"\\nul\\");
441 
442  wcscpy(Buffer, OSDirW);
443  wcscat(Buffer, L"\\nul\\\\");
445 
446  wcscpy(Buffer, OSDirW);
447  wcscat(Buffer, L"\\nul\\*");
449 
450  wcscpy(Buffer, OSDirW);
451  wcscat(Buffer, L"\\toto");
453 
454  wcscpy(Buffer, OSDirW);
455  wcscat(Buffer, L"\\toto\\");
457 
458  wcscpy(Buffer, OSDirW);
459  wcscat(Buffer, L"\\toto\\\\");
461 
462  wcscpy(Buffer, OSDirW);
463  wcscat(Buffer, L"\\toto\\*");
465 
466  // wcscpy(Buffer, baseW);
467  // wcscat(Buffer, L"\\");
468  // wcscat(Buffer, exenameW);
469  // testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
470 
471  // wcscpy(Buffer, baseW);
472  // wcscat(Buffer, L"\\.\\");
473  // wcscat(Buffer, exenameW);
474  // testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
475 /*********************/
476 
477  return;
478 }
479 
480 
481 static int init(void)
482 {
483  LPSTR p;
484  size_t i;
485 
487  if (!GetCurrentDirectoryA(sizeof(baseA)/sizeof(baseA[0]), baseA)) return 0;
488  strcpy(selfnameA, myARGV[0]);
489 
490  /* Strip the path of selfname */
491  if ((p = strrchr(selfnameA, '\\')) != NULL)
492  exenameA = p + 1;
493  else
495 
496  if ((p = strrchr(exenameA, '/')) != NULL)
497  exenameA = p + 1;
498 
499  if (!GetWindowsDirectoryA(OSDirA, sizeof(OSDirA)/sizeof(OSDirA[0]))) return 0;
500 
501  /* Quick-and-dirty conversion ANSI --> UNICODE without the Win32 APIs */
502  for (i = 0 ; i <= strlen(baseA) ; ++i)
503  {
504  baseW[i] = (WCHAR)baseA[i];
505  }
506  for (i = 0 ; i <= strlen(selfnameA) ; ++i)
507  {
508  selfnameW[i] = (WCHAR)selfnameA[i];
509  }
511  for (i = 0 ; i <= strlen(OSDirA) ; ++i)
512  {
513  OSDirW[i] = (WCHAR)OSDirA[i];
514  }
515 
516  return 1;
517 }
518 
519 START_TEST(FindFiles)
520 {
521  int b = init();
522  ok(b, "Basic init of FindFiles test\n");
523  if (!b) return;
524 
527 }
#define TRUE
Definition: types.h:120
static WCHAR selfnameW[MAX_PATH]
Definition: FindFiles.c:25
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
WCHAR CurrentDirectory[1024]
Definition: chkdsk.c:74
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char CHAR
Definition: xmlstorage.h:175
static int init(void)
Definition: FindFiles.c:481
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:421
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
static int fd
Definition: io.c:51
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static WCHAR OSDirW[MAX_PATH]
Definition: FindFiles.c:21
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:56
START_TEST(FindFiles)
Definition: FindFiles.c:519
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static CHAR selfnameA[MAX_PATH]
Definition: FindFiles.c:24
#define testType2_W(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError)
Definition: FindFiles.c:86
smooth NULL
Definition: ftsmooth.c:416
static INT myARGC
Definition: FindFiles.c:28
Definition: bufpool.h:45
static LPWSTR exenameW
Definition: FindFiles.c:27
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
static LPSTR exenameA
Definition: FindFiles.c:26
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static void Test_FindFirstFileA(void)
Definition: FindFiles.c:98
int winetest_get_mainargs(char ***pargv)
#define testType2_A(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError)
Definition: FindFiles.c:75
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
Definition: path.c:2205
static void Test_FindFirstFileW(void)
Definition: FindFiles.c:289
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2248
#define ok(value,...)
Definition: atltest.h:57
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2145
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2336
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define testType1_W(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename)
Definition: FindFiles.c:61
static LPSTR * myARGV
Definition: FindFiles.c:29
#define testType1_A(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename)
Definition: FindFiles.c:47
static WCHAR baseW[MAX_PATH]
Definition: FindFiles.c:23
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static CHAR baseA[MAX_PATH]
Definition: FindFiles.c:22
#define ERROR_INVALID_NAME
Definition: compat.h:93
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static CHAR OSDirA[MAX_PATH]
Definition: FindFiles.c:20