From d74b6055fe882504742be0f96d01b03607fdfd3b Mon Sep 17 00:00:00 2001 From: Duane Clark Date: Mon, 31 Jul 2006 12:14:04 -0700 Subject: [PATCH] msvcrt: Test fgetwc/s in binary mode. --- dlls/msvcrt/tests/file.c | 99 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 92 insertions(+), 7 deletions(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index b9387ce9d26..284e3ba4a68 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -261,27 +261,112 @@ static void test_fgetwc( void ) char* tempf; FILE *tempfh; - static const char mytext[]= "This is test_fgetwc\n"; - WCHAR wtextW[LLEN+1]; + static const char mytext[]= "This is test_fgetwc\r\n"; + WCHAR wtextW[MSVCRT_BUFSIZ+LLEN+1]; WCHAR *mytextW = NULL, *aptr, *wptr; BOOL diff_found = FALSE; - unsigned int i; + int i, j; + long l; tempf=_tempnam(".","wne"); - tempfh = fopen(tempf,"wt"); /* open in TEXT mode */ + tempfh = fopen(tempf,"wb"); + j = 'a'; + /* pad to almost the length of the internal buffer */ + for (i=0; i