test.sh: add rust/cargo runner
This commit is contained in:
parent
3b768f045c
commit
ba84afae67
1 changed files with 7 additions and 3 deletions
4
test.sh
4
test.sh
|
@ -8,9 +8,13 @@ YEAR=2020
|
||||||
|
|
||||||
run_solution() {
|
run_solution() {
|
||||||
if [ -d "$solution" ]; 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
|
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
|
||||||
else
|
else
|
||||||
case "$(basename "$solution")" in
|
case "$(basename "$solution")" in
|
||||||
*.hs)
|
*.hs)
|
||||||
|
|
Loading…
Reference in a new issue