mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
264 B
15 lines
264 B
5 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Unofficial Bash Strict Mode
|
||
|
set -euo pipefail
|
||
|
IFS='
|
||
|
'
|
||
|
|
||
|
submitted=$(student/my_answer.sh)
|
||
|
expected=$(solutions/my_answer.sh)
|
||
|
|
||
|
if ! diff -q <(echo "$submitted") <(echo "$expected") &>/dev/null; then
|
||
|
echo "Wrong answer, detective."
|
||
|
exit 1
|
||
|
fi
|