#!/bin/bash errors=() echo '=== Testing anglais ===' # read files for file in $(find tests -type f); do echo "-v- Test-running file $file -v-" if ! timeout 3s ./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