Sdfdataset: empty file with FirstLineAsSchema reports Recordcount 1 instead of 0
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
An sdfdataset that has FirstLineAsSchema set to true will report recordcount 1 when trying to open a non-existing file.
Steps to reproduce:
Run the attached fpcunit test project.
Test output includes:
00.001 TestEmptyFileHeader Failed: Number of records in test dataset expec
ted: <0> but was: <1>
00.000 TestEmptyFileNoHeader
So, if FirstLineAsSchema is false, the result is corret (0)
Additional information:
tcsdf.pp was taken from packages\fcl-db\tests and the empty file tests added.
Suggest this file is used to replace the existing version (diff included).
No idea how to set up database.ini to exercise tcsdf.pp though that's why I added it to another test framework.
Mantis conversion info:
- Mantis ID: 22894
- OS: Windows
- OS Build: Vista
- Build: r22394
- Platform: x64
- Version: 2.7.1