msvcrt: In unbuffered text mode reading \r\n with fgetc fails.

This commit is contained in:
Uwe Bonnes 2010-01-10 15:08:51 +01:00 committed by Alexandre Julliard
parent 54aa61798f
commit 5926277473
1 changed files with 8 additions and 0 deletions

View File

@ -438,6 +438,14 @@ static void test_fgetc( void )
ret = fgetc(tempfh);
ok(ich == ret, "Second fgetc expected %x got %x\n", ich, ret);
fclose(tempfh);
tempfh = fopen(tempf,"wt");
fputc('\n', tempfh);
fclose(tempfh);
tempfh = fopen(tempf,"wt");
setbuf(tempfh, NULL);
ret = fgetc(tempfh);
ok(ret == -1, "Unbuffered fgetc in text mode must failed on \\r\\n\n");
fclose(tempfh);
unlink(tempf);
free(tempf);
}