Vitaliy Margolen wrote:
+ _lseek(tempfd, -1, FILE_END); + ok(_read(tempfd,btext,LLEN) == 1, "_read expected 0 got '\\n'\n");
That doesn't look right. Richard.
Saturday, October 8, 2005, 5:53:13 AM, Richard Cohen wrote:
Vitaliy Margolen wrote:
+ _lseek(tempfd, -1, FILE_END); + ok(_read(tempfd,btext,LLEN) == 1, "_read expected 0 got '\\n'\n"); That doesn't look right.
What's not right about it? It moves to the last byte and tries to read it. Which is '\n' and should not be read. Tested on windows and that's what it does. Vitaliy
Vitaliy Margolen wrote:
Saturday, October 8, 2005, 5:53:13 AM, Richard Cohen wrote:
+ ok(_read(tempfd,btext,LLEN) == 1, "_read expected 0 got '\\n'\n");
What's not right about it?
ret = _read(tempfd,btext,LLEN); ok(ret == 0, "_read expected 0, got %d\n", ret); ^ | :) Richard.
Saturday, October 8, 2005, 10:05:48 AM, Richard Cohen wrote:
Vitaliy Margolen wrote:
Saturday, October 8, 2005, 5:53:13 AM, Richard Cohen wrote:
+ ok(_read(tempfd,btext,LLEN) == 1, "_read expected 0 got '\\n'\n");
What's not right about it?
ret = _read(tempfd,btext,LLEN); ok(ret == 0, "_read expected 0, got %d\n", ret);
^ | :)
Ah, doh. Just forgot to change an error message ;) Vitaliy
"Richard" == Richard Cohen <richard(a)daijobu.co.uk> writes:
Richard> Vitaliy Margolen wrote: >> + _lseek(tempfd, -1, FILE_END); + ok(_read(tempfd,btext,LLEN) == 1, >> "_read expected 0 got '\\n'\n"); Richard> That doesn't look right. Why do we like to play "question and answer" without giving the answer? What oesn't look right, how would you code it? -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
participants (3)
-
Richard Cohen -
Uwe Bonnes -
Vitaliy Margolen