Standalone tester for 42-style get_next_line projects.
It provides a small command-line driver, --root based target selection,
multiple BUFFER_SIZE profiles, mandatory checks, bonus checks, and optional
Valgrind leak checks.
| File | Contents |
|---|---|
CHANGELOG.md |
Version history and planned changes. |
docs/USAGE.md |
Command and workflow guide. |
docs/COVERAGE.md |
Current test coverage. |
docs/TROUBLESHOOTING.md |
Common failures and fixes. |
CONTRIBUTING.md |
Contribution guidelines. |
SECURITY.md |
Security policy. |
make build
./gnl_tester --root /path/to/Get_Next_LineOr with make:
make ROOT_DIR=/path/to/Get_Next_LineExample with an absolute target path:
./gnl_tester --root /absolute/path/to/Get_Next_Line--root PATH target get_next_line project directory (default: ..)
--bonus use get_next_line_bonus.c/.h and test interleaved fds
--buffer LIST comma-separated BUFFER_SIZE list
--quick BUFFER_SIZE=1,42
--strict BUFFER_SIZE=1,2,3,4,5,7,8,16,32,42,64,128,1024
--leaks run each suite with Valgrind when available
--no-color disable colors
--help show help
- invalid fd;
- empty file;
- line without a final newline;
- line with a final newline;
- multiple lines;
- consecutive empty lines;
- lines larger than
BUFFER_SIZE; - buffer boundary cases;
- repeated calls after EOF;
- bonus mode with two interleaved file descriptors.
The tester compiles the target project once per BUFFER_SIZE with:
cc -Wall -Wextra -Werror -D BUFFER_SIZE=N
This catches bugs that only appear with tiny buffers, larger buffers, or boundary-sized reads.