[fdo-trac] #571: Fix FDO IoTest unit test to work with piped streams.

FDO trac_fdo at osgeo.org
Fri Oct 23 08:06:02 EDT 2009


#571: Fix FDO IoTest unit test to work with piped streams.
-----------------------------+----------------------------------------------
   Reporter:  brentrobinson  |       Owner:  brentrobinson                 
       Type:  defect         |      Status:  new                           
   Priority:  major          |   Milestone:  3.5.0                         
  Component:  General        |     Version:  3.4.0                         
   Severity:  3              |    Keywords:  FdoIoFileStream pipe unit test
External_id:                 |  
-----------------------------+----------------------------------------------
 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.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/571>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list