Nikolay Sivov (@nsivov) commented about dlls/scrrun/tests/filesystem.c:
+ char ExpectedA[MAX_PATH]; + BSTR nameW; + HRESULT hr; + BOOL ret; + + get_temp_filepath(testfileW, pathW, dirW); + + ret = CreateDirectoryW(dirW, NULL); + ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError()); + + nameW = SysAllocString(pathW); + + hr = write_blank_lines(nameW, VARIANT_FALSE, -1); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); + lstrcpyA(ExpectedA, ""); + test_file_contents(pathW,lstrlenA(ExpectedA),ExpectedA); I know WriteLine() is already doing that, but you can get rid of copies here and simply pass string constants to test_file_contents().
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7289#note_94077