2011/7/7 Frédéric Delanoy frederic.delanoy@gmail.com:
c = outbuffer[sizeof(outbuffer) - 1]; ok(ungetc(c, file) == c, "ungetc did not return its input for bufmode=%x\n", bufmodes[bufmode]); ok(!feof(file), "feof after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
- ok((c = fgetc(file)) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
- ok(fgetc(file) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
ok(c == outbuffer[sizeof(outbuffer) - 1], "getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]);
Also, this change doesn't look like it's removing a dead assignment, but it does make the test ok(c == outbuffer[sizeof(outbuffer) - 1], ...) always succeed.
Octavian
On Thu, Jul 7, 2011 at 19:07, Octavian Voicu octavian.voicu@gmail.com wrote:
2011/7/7 Frédéric Delanoy frederic.delanoy@gmail.com:
c = outbuffer[sizeof(outbuffer) - 1]; ok(ungetc(c, file) == c, "ungetc did not return its input for bufmode=%x\n", bufmodes[bufmode]); ok(!feof(file), "feof after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
- ok((c = fgetc(file)) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
- ok(fgetc(file) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]);
ok(c == outbuffer[sizeof(outbuffer) - 1], "getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]);
Also, this change doesn't look like it's removing a dead assignment, but it does make the test ok(c == outbuffer[sizeof(outbuffer) - 1], ...) always succeed.
Oops right. Thanks for spotting. I'll fix that.