Automatic add
This commit is contained in:
parent
2be935a043
commit
1279d64327
|
@ -28,13 +28,13 @@ fi
|
|||
catch stout sterr "${tmp_out}"
|
||||
|
||||
printf "%s\n" "Testing ${SRC}"
|
||||
printf "Expected Output --> Test Output\n"
|
||||
diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")"
|
||||
|
||||
if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then
|
||||
printf "\e[102;30m%s\e[m\n" "All tests passed"
|
||||
exit_status="0"
|
||||
else
|
||||
printf "Expected Output --> Test Output\n"
|
||||
printf '%s' "${diff_out}" | head -n -1
|
||||
printf "\e[101;37m%s\e[m\n" "At least one test failed"
|
||||
exit_status="1"
|
||||
|
|
Loading…
Reference in New Issue