public/sh/tests/cl-camp5_test.sh

19 lines
399 B
Bash
Raw Permalink Normal View History

2020-04-02 10:01:44 +00:00
#!/usr/bin/env bash
# Unofficial Bash Strict Mode
set -euo pipefail
IFS='
'
script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd)
challenge() {
submitted=$(cd "$1" && bash "$script_dirS"/student/lookagain.sh)
expected=$(cd "$1" && bash "$script_dirS"/solutions/lookagain.sh)
2020-04-02 10:01:44 +00:00
diff <(echo "$submitted") <(echo "$expected")
}
challenge cl-camp5/folder1
challenge cl-camp5/folder2