Sha256: 0817c6c14f8a92e4d45216d7584f55d0ba92119724c3a01b8ab593a5d79329e4
Contents?: true
Size: 853 Bytes
Versions: 91
Compression:
Stored size: 853 Bytes
Contents
#!/usr/bin/env bash # # Validate if tests can run properly and the example implementation # is passing the tests for each exercise set -o errexit set -o nounset root_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ && pwd )" temp_folder_name="exercises_temp/" temp_folder="$root_path/$temp_folder_name" # Clean up after script on normal or forced exit trap "{ rm -rf $temp_folder; }" EXIT cp exercises $temp_folder -r cd $temp_folder for exercise in *; do cd $exercise echo "Processing $exercise" # Replace "-" with "_" to follow bash conventions exercise_name=$(echo "$exercise" | sed -r 's/[-]+/_/g') test_file=${exercise_name}_test.sh # Create implementation file from example cp example.sh ${exercise_name}.sh # Unskip all the tests sed -i 's/skip/# skip/g' $test_file # Run the tests bats $test_file cd ../ done
Version data entries
91 entries across 91 versions & 1 rubygems