Alexandre Julliard (@julliard) commented about dlls/kernel32/tests/file.c:
- fri->Flags = 0;
- fri->FileNameLength = wcslen(tempFileTo2) * sizeof(WCHAR);
- memcpy(fri->FileName, tempFileTo2, fri->FileNameLength + sizeof(WCHAR));
- ret = pSetFileInformationByHandle(file, FileRenameInfoEx, fri, size);
- ok(ret, "FileRenameInfoEx failed, error %ld\n", GetLastError());
- CloseHandle(file);
- file = CreateFileW(tempFileTo2, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "file not renamed, error %ld\n", GetLastError());
- fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR);
- memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR));
- ret = pSetFileInformationByHandle(file, FileRenameInfoEx, fri, size);
- todo_wine
- ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "FileRenameInfoEx unexpected result %ld\n", GetLastError());
- CloseHandle(file);
Please merge that into the existing FileRenameInfo tests, there's no need to duplicate the whole thing.