mirror of https://github.com/01-edu/public.git
refactor(division_test): make challenge function more modular
This commit is contained in:
parent
de9d5caeb7
commit
dcee131cf0
|
@ -15,15 +15,8 @@ challenge() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Test with one or two arguments
|
submitted=$(bash "$script_dirS"/student/division.sh $@)
|
||||||
if [ $# -eq 1 ]
|
expected=$(bash "$script_dirS"/solutions/division.sh $@)
|
||||||
then
|
|
||||||
submitted=$(bash "$script_dirS"/student/division.sh $1)
|
|
||||||
expected=$(bash "$script_dirS"/solutions/division.sh $1)
|
|
||||||
else
|
|
||||||
submitted=$(bash "$script_dirS"/student/division.sh $1 $2)
|
|
||||||
expected=$(bash "$script_dirS"/solutions/division.sh $1 $2)
|
|
||||||
fi
|
|
||||||
diff <(echo "$submitted") <(echo "$expected")
|
diff <(echo "$submitted") <(echo "$expected")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue