kernel32: add a test for CreateFileA()

Austin English austinenglish at gmail.com
Sun Jul 18 20:47:25 CDT 2010


On Sun, Jul 18, 2010 at 9:39 AM, James McKenzie
<jjmckenzie51 at earthlink.net> wrote:
> Austin English wrote:
>>
>> Passed all the vm's on wtb.
>>
>>  ------------------------------------------------------------------------
>>
>>
>
> +    hFile = CreateFileA("c:\\*.*",
> GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL
> );
> +    ok(GetLastError() == ERROR_INVALID_NAME || broken(GetLastError() ==
> ERROR_FILE_NOT_FOUND) || broken(GetLastError() == ERROR_PATH_NOT_FOUND),
> +       "CreateFileA should have returned ERROR_INVALID_NAME on %s, but got
> %u\n", filename, GetLastError());
> +    CloseHandle( hFile );
>
> Nice negative test, but how about one that should pass?

There are already several CreateFile tests. Look at the filename it's
creating, that file should of course fail.

-- 
-Austin



More information about the wine-devel mailing list