From: Piotr Caban piotr@codeweavers.com
--- dlls/msvcp120/tests/msvcp120.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index b3dbacd082a..26bbf5b6535 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -3377,6 +3377,7 @@ static void test__Fiopen(void) int i, ret; FILE *f; wchar_t wpath[MAX_PATH]; + HANDLE h; static const struct { const char *loc; const char *path; @@ -3399,8 +3400,17 @@ static void test__Fiopen(void) ok(ret, "MultiByteToWideChar failed on %s with locale %s: %lx\n", tests[i].path, tests[i].loc, GetLastError());
- f = p__Fiopen(tests[i].path, OPENMODE_out, SH_DENYNO); - ok(!!f, "failed to create %s with locale %s\n", tests[i].path, tests[i].loc); + h = CreateFileW(wpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) + { + skip("can't create test file (%s)\n", wine_dbgstr_w(wpath)); + continue; + } + CloseHandle(h); + + f = p__Fiopen(tests[i].path, OPENMODE_in, SH_DENYNO); + ok(!!f, "failed to create %s with locale %s\n", wine_dbgstr_a(tests[i].path), tests[i].loc); p_fclose(f);
f = p__Fiopen_wchar(wpath, OPENMODE_in, SH_DENYNO);