Opened 15 years ago

Closed 15 years ago

#571 closed defect (fixed)

Fix FDO IoTest unit test to work with piped streams.

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone: 3.5.0
Component: General Version: 3.4.0
Severity: 3 Keywords: FdoIoFileStream pipe unit test
Cc: External ID:

Description

If the FDO unit tests are run by the following steps:

  • cd Fdo\Unmanaged\bin\win32\debug
  • echo "hello" | unittest FdoIoTest

then TestFileCapabilities fails on the assertion "stream->HasContext() == true".

The reason is that FdoIoFileStream reports that stdin does not have context (it is on a pipe in this case), but the unit test expects it to have context.

FdoIoFileStream is working correctly. Although functions, such as ftell and fseek, work successfully on pipes, pipes are not contextual. fseek will succeed but the current file pointer will not actually move. Therefore, the fix will be to correct the unit test.

Change History (2)

comment:1 by brentrobinson, 15 years ago

Status: newassigned

comment:2 by brentrobinson, 15 years ago

Resolution: fixed
Status: assignedclosed

Revision: 5040 Author: brentrobinson Date: 12:57:45 PM, Friday, October 23, 2009 Message: Ticket#571: Fixed TestFileCapabilities for the case where stdin is on a pipe.


Modified : /trunk/Fdo/UnitTest/IoTest.cpp

Note: See TracTickets for help on using tickets.