test.sh: skip hidden files and example.txt

This commit is contained in:
Xiretza 2020-12-10 19:20:56 +01:00
parent 8260604f97
commit 73cbd0758c

View file

@ -27,6 +27,8 @@ run_solution() {
fi
}
shopt -s dotglob
for n in $(seq 1 25); do
input=$YEAR/data/day$n.input
expected=$YEAR/data/day$n.expected
@ -34,6 +36,12 @@ for n in $(seq 1 25); do
for solution in "$YEAR/day$n"/*; do
echo -n "$solution... "
case "${solution##*/}" in
example.txt)
echo SKIP
continue
esac
solution_output=$(mktemp)
trap "rm -f '$solution_output'" EXIT