aboutsummaryrefslogtreecommitdiff
path: root/lib/io/test/get_line.c
AgeCommit message (Collapse)Author
2023-06-05libio: istream_get_line: fix trailing CR sanitationDavid Oberhollenzer
The istream_get_line function is supposed to remove the line break, inclduing CR+LF if used. The previous implementation simply checked the buffer when the LF was found, missing the case where the CR was alraedy added and the LF is at the beginning of the newly loaded data. This commit modifies the check to inspect the line itself when it was found, and remove the CR after the fact. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-03libio: consolidate add-hoc memory istream_t implementationsDavid Oberhollenzer
In several places, there are ad-hoc istream_t implementations that read from a memory buffer to test something else stacked on top. This commit consolidates those ad-hoc implmentations into a proper one in libio, and uses the chance to remove external files for some older tests that rely on file I/O instead. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-01-31Reintegrate test code with library codeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>