Skip to content

NeddyKun01/Get_Next_Line-Tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Get Next Line Tester

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.

Documentation

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.

Quick Start

make build
./gnl_tester --root /path/to/Get_Next_Line

Or with make:

make ROOT_DIR=/path/to/Get_Next_Line

Example with an absolute target path:

./gnl_tester --root /absolute/path/to/Get_Next_Line

Options

--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

What It Checks

  • 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.

About

๐Ÿ“„ A focused testing suite designed to validate mandatory and bonus cases for 42 School GNL project.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors