Thank you. 2014-02-06 15:56 GMT+08:00 Dmitry Timoshkov <dmitry(a)baikal.ru>:
Zhenbo Li <litimetal(a)gmail.com> wrote:
+ strcpy(buffer2, nonexistent); + handle = CreateFileA(buffer2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 );
There is no need for a strcpy(). Well, I'll add more tests later(like trailing \\).
+ ok(handle != INVALID_HANDLE_VALUE, "failed to create a file\n"); + handle = FindFirstFileA(buffer2, &data); + ok(handle != FindFirstFileA, "failed to find an existent file\n");
It would be useful to actually test what FindFirstFileA() returns. Also not leaking the handle *twice* would be a bonus point.
Thank you for mentioning that. Most of the previous testcases leak the handle. After this patch, is it necessary to fix them? -- Have a nice day! Zhenbo Li