Markus Amsler : msvcrt: Add fread eof tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 13 05:25:44 CDT 2006
Module: wine
Branch: master
Commit: ef5ed0a42a90ac5878c8e4ad1d35e4b48daec1e1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef5ed0a42a90ac5878c8e4ad1d35e4b48daec1e1
Author: Markus Amsler <markus.amsler at oribi.org>
Date: Fri Oct 13 00:02:42 2006 +0200
msvcrt: Add fread eof tests.
---
dlls/msvcrt/tests/file.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index 3a89b3d..00bd253 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -220,6 +220,17 @@ static void test_readmode( BOOL ascii_mo
j = fp+10;
i=fread(buffer,1,j,file);
ok(i==j,"fread failed, expected %d got %d in %s\n", j, i, IOMODE);
+ /* test fread eof */
+ ok(fseek(file,0,SEEK_END)==0,"seek failure in %s\n", IOMODE);
+ ok(feof(file)==0,"feof failure in %s\n", IOMODE);
+ ok(fread(buffer,1,1,file)==0,"fread failure in %s\n", IOMODE);
+ ok(feof(file)!=0,"feof failure in %s\n", IOMODE);
+ ok(fseek(file,-3,SEEK_CUR)==0,"seek failure in %s\n", IOMODE);
+ todo_wine ok(feof(file)==0,"feof failure in %s\n", IOMODE);
+ ok(fread(buffer,2,1,file)==1,"fread failed in %s\n", IOMODE);
+ todo_wine ok(feof(file)==0,"feof failure in %s\n", IOMODE);
+ ok(fread(buffer,2,1,file)==0,"fread failure in %s\n",IOMODE);
+ ok(feof(file)!=0,"feof failure in %s\n", IOMODE);
/* test some additional functions */
rewind(file);
More information about the wine-cvs
mailing list