ntdll: add some tests for NtDeleteFile
Jeff Zaroyko
jeffzaroyko at gmail.com
Sat Aug 30 23:40:31 CDT 2008
On Sun, Aug 31, 2008 at 3:55 AM, Vitaliy Margolen
<wine-devel at kievinfo.com> wrote:
> Jeff Zaroyko wrote:
>>
>>
>> + static const WCHAR testdirW[] = {'n','t','d','e','l','e','t','e','f','i','l','e',0};
>> + static const WCHAR subdirW[] = {'\\','s','u','b',0};
>> +
>> + ret = CreateDirectoryW(testdirW, NULL);
> You need to create test files and directories in windows temp dir.
ok, I've sent a new patch that uses the temp dir.
>
>> + pRtlDosPathNameToNtPathName_U(testdirW, &nameW, NULL, NULL);
>
> You are leaking unicode string nameW. You need to call this to free it:
> RtlFreeUnicodeString( &nameW );
Thanks
>> + ret = pNtDeleteFile(&attr);
>> + ok(ret == STATUS_SUCCESS, "expected NtDeleteFile to ret STATUS_SUCCESS on failure\n");
> How do you know it's a failure? You should check if dir is still there.
I check the return value from RemoveDirectory to test if it was still
there. I think the revised patch is clearer, I'll fix my kernel32
tests patch too.
> Vitaliy
>
More information about the wine-devel
mailing list