Browse Source

refactor(division_test): make challenge function more modular

pull/1914/head
Michele Sessa 2 years ago committed by Michele
parent
commit
dcee131cf0
  1. 11
      sh/tests/division_test.sh

11
sh/tests/division_test.sh

@ -15,15 +15,8 @@ challenge() {
return
fi
# Test with one or two arguments
if [ $# -eq 1 ]
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
submitted=$(bash "$script_dirS"/student/division.sh $@)
expected=$(bash "$script_dirS"/solutions/division.sh $@)
diff <(echo "$submitted") <(echo "$expected")
}

Loading…
Cancel
Save