Commit f2bfc7b1 authored by Ivan Leo's avatar Ivan Leo Committed by Alexandre Julliard

msvcrt/tests: Don't leave files on the disk.

parent 289a068b
...@@ -472,14 +472,14 @@ static void test_get_osfhandle(void) ...@@ -472,14 +472,14 @@ static void test_get_osfhandle(void)
DWORD bytes_written; DWORD bytes_written;
HANDLE handle; HANDLE handle;
fd = _sopen(fname, _O_CREAT|_O_RDWR, _SH_DENYRW, 0); fd = _sopen(fname, _O_CREAT|_O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE);
handle = (HANDLE)_get_osfhandle(fd); handle = (HANDLE)_get_osfhandle(fd);
WriteFile(handle, "bar", 3, &bytes_written, NULL); WriteFile(handle, "bar", 3, &bytes_written, NULL);
_close(fd); _close(fd);
fd = _open(fname, _O_RDONLY, 0); fd = _open(fname, _O_RDONLY, 0);
ok(fd != -1, "Coudn't open '%s' after _get_osfhanle()\n", fname); ok(fd != -1, "Coudn't open '%s' after _get_osfhanle()\n", fname);
CloseHandle(handle); _close(fd);
_unlink(fname); _unlink(fname);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment