add unit tests to test action and separate unit_tests.sh from test_all.sh
All checks were successful
/ test (push) Successful in 43s
All checks were successful
/ test (push) Successful in 43s
This commit is contained in:
parent
dac2cbc20d
commit
bcf0978b68
3 changed files with 29 additions and 24 deletions
26
unit_tests.sh
Normal file
26
unit_tests.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
errors=()
|
||||
|
||||
echo '=== Testing anglais ==='
|
||||
|
||||
# read files
|
||||
for file in $(find tests -type f); do
|
||||
echo "-v- Test-running file $file -v-"
|
||||
|
||||
if ! ./cli/cli run "$file"; then
|
||||
echo "-x- Error -x-"
|
||||
errors+=("$file")
|
||||
else
|
||||
echo "-+- Success -+-"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ 0 -ne "$(wc -w <<< "${errors[@]}")" ]; then
|
||||
echo "=x= Errors occured while executing =x="
|
||||
echo "erroring files: $(printf '%s ' "${errors[@]}")"
|
||||
exit 1
|
||||
else
|
||||
echo '=+= Successfully ran all tests =+='
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue