kernel32/tests: Add test for FindFirstFileA()

Dmitry Timoshkov dmitry at baikal.ru
Thu Feb 6 01:56:20 CST 2014


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().

> +    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.

-- 
Dmitry.



More information about the wine-devel mailing list