diff --git a/test.sh b/test.sh index baa9cf5..e64af44 100755 --- a/test.sh +++ b/test.sh @@ -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