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.
30 lines
603 B
30 lines
603 B
2 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
# set -euo pipefail
|
||
|
IFS='
|
||
|
'
|
||
|
|
||
|
script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd)
|
||
|
|
||
|
challenge() {
|
||
|
submitted="./check-user.sh $@
|
||
|
"
|
||
|
expected="./check-user.sh $@
|
||
|
"
|
||
|
submitted+=$(2>&1 bash "$script_dirS"/student/check-user.sh "$@")
|
||
|
expected+=$(2>&1 bash "$script_dirS"/solutions/check-user.sh "$@")
|
||
|
|
||
|
diff -U 1 <(echo "$submitted") <(echo "$expected")
|
||
|
}
|
||
|
|
||
|
challenge "-i" "root"
|
||
|
challenge "-e" "root"
|
||
|
|
||
|
challenge "-i" "unknown_not_found"
|
||
|
challenge "-e" "unknown_not_found"
|
||
|
|
||
|
challenge
|
||
|
challenge "-i" "root" "too" "many" "args"
|
||
|
challenge "-t" "root"
|
||
|
|