Re: ntdll: add some tests for NtDeleteFile
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
On Sun, Aug 31, 2008 at 3:55 AM, Vitaliy Margolen <wine-devel(a)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
participants (2)
-
Jeff Zaroyko -
Vitaliy Margolen