Skip to content

getline, getdelim: fix issues, extend tests

Florian Meißner requested to merge t-nil/relibc:tests/getline into master

With these changes, getline() and getdelim() should work as expected, test for as many errors and crash conditions as is still sensible, and have an extensive test collections which should cover most of the behavior explicitly mentioned in https://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html . There are probably FILE-related interactions which I overlooked, but I am in no way a POSIX expert.

The tests produce the same result and expect files on my systems glibc (with the exception of the cases in which we do additional error handling, which is switched on or off via a macro).

Merge request reports