This is a ridiculously simple boilerplate for creating bash scripts with tests. An example is provided.
- Clone it into your project directory.
- Put the name of your script in the
./tests/run
file. - Add
.test
files into thetests
directory.- Inside these files you can
source "$MAIN"
- Inside these files you can
- Use
assert
to test your scripts functions and variables. - Make the
./tests/run
file executable. - Use
./tests/run
to run your tests.