Module: wine Branch: master Commit: 47909d8d8b33a2c849477477bf0e063c326b2f08 URL: http://source.winehq.org/git/wine.git/?a=commit;h=47909d8d8b33a2c849477477bf...
Author: Grazvydas Ignotas notasas@gmail.com Date: Wed Jun 18 13:55:51 2014 +0300
msvcrt/tests: Test _cnt value after rewind/fflush.
---
dlls/msvcrt/tests/file.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 73965f3..353ebb4 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -2232,12 +2232,14 @@ static void test_write_flush_size(FILE *file, int bufsize)
for (size = bufsize + 1; size >= bufsize - 1; size--) { rewind(file); + ok(file->_cnt == 0, "_cnt should be 0 after rewind, but is %d\n", file->_cnt); fwrite(outbuffer, 1, size, file); /* lseek() below intentionally redirects the write in fflush() to detect * if fwrite() has already flushed the whole buffer or not. */ lseek(fd, 1, SEEK_SET); fflush(file); + todo_wine ok(file->_cnt == 0, "_cnt should be 0 after fflush, but is %d\n", file->_cnt); fseek(file, 0, SEEK_SET); ok(fread(inbuffer, 1, bufsize, file) == bufsize, "read failed\n"); if (size == bufsize)