mirror of https://github.com/01-edu/public.git
test(joker-num): fix permissions issues
ensure stop on first failure in a more compatible way (even if more basic)
This commit is contained in:
parent
0ae6ee7fec
commit
52cdb0286e
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS='
|
||||
'
|
||||
script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd)
|
||||
|
@ -10,16 +9,20 @@ challenge() {
|
|||
input="${@: -1}"
|
||||
|
||||
submitted=$(
|
||||
./student/joker-num.sh $args <<EOF
|
||||
bash ./student/joker-num.sh $args <<EOF
|
||||
$input
|
||||
EOF
|
||||
)
|
||||
expected=$(
|
||||
./solutions/joker-num.sh $args <<EOF
|
||||
bash ./solutions/joker-num.sh $args <<EOF
|
||||
$input
|
||||
EOF
|
||||
)
|
||||
diff <(echo "$submitted") <(echo "$expected")
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Good input, win
|
||||
|
|
Loading…
Reference in New Issue