We have an application that reads in a flat file and parses out the data. This file contains no header information or total data with which to do a checksum. So I would like to create test cases to make sure our application properly handles “incomplete” files.
Is there a way to create a flat file with no EOF marker? Perhaps a tool that I can use to remove the EOF marker from an existing text file?
Flat files do not contain an end of file marker.
Almost all modern filesystems are stream based, just a bunch of bytes on disk, they don’t have record/file markers.
Any end-of-file signal is added by the std library reading the file
You should test that it deals properly with incomplete lines (ie 3 values rather than 4) and missing/differnet end of lines (CR or LF rather than CR/LF)