test.sh: make shellcheck happy

This commit is contained in:
Xiretza 2022-12-01 19:19:10 +01:00
parent bb0fbc0f8f
commit 0ce9b79c20

View file

@ -11,12 +11,12 @@ OUTDIR=$(mktemp --directory)
trap "rm -rf '$OUTDIR'" EXIT
run_solution() {
if [ -d "$solution" ]; then
if [ -f "$solution/Cargo.toml" ]; then
if [[ -d "$solution" ]]; then
if [[ -f "$solution/Cargo.toml" ]]; then
cargo run --quiet --manifest-path "$solution/Cargo.toml" < "$input"
else
runfile=$solution/run.sh
[ -f "$runfile" ] || { echo "Error: $runfile not found" >&2; exit 1; }
[[ -f "$runfile" ]] || { echo "Error: $runfile not found" >&2; exit 1; }
"$runfile" "$input"
fi
else
@ -49,6 +49,9 @@ do_day() {
example*)
echo SKIP
continue
;;
*)
;;
esac
solution_output=$OUTDIR/${year}_$day.out