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