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