ntdll: add some tests for NtDeleteFile
Vitaliy Margolen
wine-devel at kievinfo.com
Sat Aug 30 12:55:57 CDT 2008
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.
> + pRtlDosPathNameToNtPathName_U(testdirW, &nameW, NULL, NULL);
You are leaking unicode string nameW. You need to call this to free it:
RtlFreeUnicodeString( &nameW );
> + 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.
Vitaliy
More information about the wine-devel
mailing list