Peter Beutner : msvcrt: Add test for fread/feof.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 17 11:41:54 CST 2006


Module: wine
Branch: refs/heads/master
Commit: b786ea588c88f2ebef8e1fb84d5f00c5ad539988
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b786ea588c88f2ebef8e1fb84d5f00c5ad539988

Author: Peter Beutner <p.beutner at gmx.net>
Date:   Fri Feb 17 17:37:40 2006 +0100

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

---

 dlls/msvcrt/tests/file.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index 6041e0b..086c37f 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -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");
 }
 




More information about the wine-cvs mailing list