msvcrt/tests: Test _cnt value after rewind/fflush.

This commit is contained in:
Grazvydas Ignotas 2014-06-18 13:55:51 +03:00 committed by Alexandre Julliard
parent ac399b0842
commit 47909d8d8b
1 changed files with 2 additions and 0 deletions

View File

@ -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)