test.sh: skip hidden files and example.txt

This commit is contained in:
Xiretza 2020-12-10 19:20:56 +01:00
parent 981633bf97
commit fb0c542f5c
Signed by: xiretza
GPG Key ID: 17B78226F7139993
1 changed files with 9 additions and 0 deletions

View File

@ -25,11 +25,20 @@ run_solution() {
fi
}
shopt -s dotglob
for day in day*; do
input=data/$day.input
expected=data/$day.expected
for solution in "$day"/*; do
echo -n "$solution... "
case "${solution##*/}" in
example.txt|.*)
echo SKIP
continue
esac
solution_output=$(mktemp)
trap "rm -f '$solution_output'" EXIT
run_solution "$solution" > "$solution_output"