This is a simple shell script that automate tests for the 42 Project Libasm/2020.
- check compilation error
- check the function output
- check the return value
- check the errno value for functions with system calls
- check STDIN and file descriptor for read function
- check STDOUT and file descriptor for write function
Clone this repo into libasm root's directory.
Make sure your Makefile has the make re
rule, and make bonus
rule if you want to test the bonus functions.
$ git clone https://github.com/vscabell/42libasm_tester.git
$ cd 42libasm_tester
$ bash runtest.sh
$ bash runtest.sh bonus
Add successively the functions in the order you want, for example :
$ bash runtest.sh read
$ bash runtest.sh strlen strdup
$ bash runtest.sh bonus atoi_base
Take a look at /42libasm_tester/unit_tests/diffs
directory for diffs files
Some of the outputs examples