Skip to content

Instantly share code, notes, and snippets.

@XIIIVI
Created June 12, 2020 12:53
Show Gist options
  • Save XIIIVI/a5029bdcebb4e5681b8487e187e49121 to your computer and use it in GitHub Desktop.
Save XIIIVI/a5029bdcebb4e5681b8487e187e49121 to your computer and use it in GitHub Desktop.
#
# analyze_test_result
#
analyze_test_result() {
if [ ${TEST_COUNT} -eq ${PASSED_TEST_COUNT} ]; then
banner "SUCCESS"
echo -e "${GREEN}${TEST_COUNT} tests passed${RESET_COLOR}"
exit 0
else
banner "failure" ${RED}
echo -e "${RED}$((TEST_COUNT - PASSED_TEST_COUNT))/${TEST_COUNT} tests failed${RESET_COLOR}"
exit 1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment