test.sh: make shellcheck happy
This commit is contained in:
parent
bb0fbc0f8f
commit
0ce9b79c20
1 changed files with 6 additions and 3 deletions
9
test.sh
9
test.sh
|
@ -11,12 +11,12 @@ OUTDIR=$(mktemp --directory)
|
||||||
trap "rm -rf '$OUTDIR'" EXIT
|
trap "rm -rf '$OUTDIR'" EXIT
|
||||||
|
|
||||||
run_solution() {
|
run_solution() {
|
||||||
if [ -d "$solution" ]; then
|
if [[ -d "$solution" ]]; then
|
||||||
if [ -f "$solution/Cargo.toml" ]; then
|
if [[ -f "$solution/Cargo.toml" ]]; then
|
||||||
cargo run --quiet --manifest-path "$solution/Cargo.toml" < "$input"
|
cargo run --quiet --manifest-path "$solution/Cargo.toml" < "$input"
|
||||||
else
|
else
|
||||||
runfile=$solution/run.sh
|
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"
|
"$runfile" "$input"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -49,6 +49,9 @@ do_day() {
|
||||||
example*)
|
example*)
|
||||||
echo SKIP
|
echo SKIP
|
||||||
continue
|
continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
solution_output=$OUTDIR/${year}_$day.out
|
solution_output=$OUTDIR/${year}_$day.out
|
||||||
|
|
Loading…
Reference in a new issue