2023-01-16 15:01:55 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
|
|
|
|
script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd)
|
|
|
|
|
|
|
|
challenge() {
|
|
|
|
$(bash "$script_dirS"/student/input-redirection.sh)
|
2023-01-17 11:22:50 +00:00
|
|
|
submitted=$(bash "$script_dirS"/show-info.sh)
|
|
|
|
rm show-info.sh
|
2023-01-16 15:01:55 +00:00
|
|
|
$(bash "$script_dirS"/solutions/input-redirection.sh)
|
2023-01-17 11:22:50 +00:00
|
|
|
expected=$(bash "$script_dirS"/show-info.sh)
|
|
|
|
rm show-info.sh
|
2023-01-16 15:01:55 +00:00
|
|
|
|
|
|
|
diff <(echo "$submitted") <(echo "$expected")
|
|
|
|
}
|
|
|
|
|
|
|
|
challenge
|