We try to use Test Driven Developing (TDD) to produce our code.
One of the best ways to do this in this project is through clitest.
With one simple command line you can execute all currently developed:
$ ./test/all.sh
The command above will produce the following output:
Testing all ... =============== Test block #1 in functions/validate-lab-name.sh: Function should return a valid lab name #1 function-test.sh ../functions/validate-lab-name.sh .. lab111.sh #2 function-test.sh ../functions/validate-lab-name.sh .. 111 OK: 2 of 2 tests passed Test block #1 in build.sh: Header should have at least 3 line(s) #1 (( 3 >= 3 )) OK: 1 of 1 test passed Test block #2 in build.sh: Header should have at least a "Purpose" and one (1) reference "References.Ref1" #1 sed -n '2,/^#$/{/^#$/!p;}' ../build.sh | cut -c 3- | yq r - Purpose #2 sed -n '2,/^#$/{/^#$/!p;}' ../build.sh | cut -c 3- | yq r - References.Ref1 OK: 2 of 2 tests passed =============== Congratulations! 😃 All tests passed!