test.sh: fix removal of test output files
This commit is contained in:
parent
173bab5a0f
commit
981633bf97
1 changed files with 3 additions and 1 deletions
4
test.sh
4
test.sh
|
@ -31,7 +31,7 @@ for day in day*; do
|
||||||
for solution in "$day"/*; do
|
for solution in "$day"/*; do
|
||||||
echo -n "$solution... "
|
echo -n "$solution... "
|
||||||
solution_output=$(mktemp)
|
solution_output=$(mktemp)
|
||||||
trap "rm $solution_output" EXIT
|
trap "rm -f '$solution_output'" EXIT
|
||||||
run_solution "$solution" > "$solution_output"
|
run_solution "$solution" > "$solution_output"
|
||||||
|
|
||||||
if ! diff -u "$expected" "$solution_output"; then
|
if ! diff -u "$expected" "$solution_output"; then
|
||||||
|
@ -48,5 +48,7 @@ for day in day*; do
|
||||||
else
|
else
|
||||||
echo ok
|
echo ok
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm "$solution_output"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue