kernel32/tests: Add test for FindFirstFileA()

Zhenbo Li litimetal at gmail.com
Thu Feb 6 04:44:54 CST 2014


Thank you.

2014-02-06 15:56 GMT+08:00 Dmitry Timoshkov <dmitry at baikal.ru>:
> Zhenbo Li <litimetal at 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



More information about the wine-devel mailing list