Commit b786ea58 authored by Peter Beutner's avatar Peter Beutner Committed by Alexandre Julliard

msvcrt: Add test for fread/feof.

When calling fread() with a large enough buffer to reach the end of the file a subsequent feof() should return true; (marked as todo_wine because it doesn't work atm).
parent 916c4b6b
......@@ -119,6 +119,15 @@ static void test_fileops( void )
ok(fgetws(wbuffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected\n");
ok(lstrlenW(wbuffer) == 1,"fgets dropped chars\n");
fclose (file);
file = fopen("fdopen.tst", "rb");
ok( file != NULL, "fopen failed");
/* sizeof(buffer) > content of file */
ok(fread(buffer, sizeof(buffer), 1, file) == 0, "fread test failed\n");
/* feof should be set now */
todo_wine ok(feof(file), "feof after fread failed\n");
fclose (file);
unlink ("fdopen.tst");
}
......
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