From: Piotr Caban piotr@codeweavers.com
--- dlls/msvcr120/tests/msvcr120.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 9ee2890d8e6..898f3570596 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -1840,6 +1840,7 @@ static void test__fsopen(void) int i, ret; FILE *f; wchar_t wpath[MAX_PATH]; + HANDLE h; static const struct { const char *loc; const char *path; @@ -1862,8 +1863,17 @@ static void test__fsopen(void) ok(ret, "MultiByteToWideChar failed on %s with locale %s: %lx\n", tests[i].path, tests[i].loc, GetLastError());
+ 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__fsopen(tests[i].path, "w", SH_DENYNO); - ok(!!f, "failed to create %s with locale %s\n", tests[i].path, tests[i].loc); + ok(!!f, "failed to create %s with locale %s\n", wine_dbgstr_a(tests[i].path), tests[i].loc); p_fclose(f);
f = p__wfsopen(wpath, L"r", SH_DENYNO);