Created
September 3, 2015 11:26
-
-
Save dseg/f1b0354f68c6660eb90a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- shunit2 2011-05-01 20:10:33.000000000 +0000 | |
| +++ shunit2-color 2015-09-03 11:23:08.854549999 +0000 | |
| @@ -829,18 +829,18 @@ | |
| && _shunit_skipped_="skipped=${__shunit_assertsSkipped}" | |
| if [ ${_shunit_ok_} -eq ${SHUNIT_TRUE} ]; then | |
| - _shunit_msg_='OK' | |
| + _shunit_msg_="\033[32;1mOK\033[0m\n" | |
| [ -n "${_shunit_skipped_}" ] \ | |
| && _shunit_msg_="${_shunit_msg_} (${_shunit_skipped_})" | |
| else | |
| - _shunit_msg_="FAILED (${_shunit_failures_}" | |
| + _shunit_msg_="\033[31;1mFAILED (${_shunit_failures_}" | |
| [ -n "${_shunit_skipped_}" ] \ | |
| && _shunit_msg_="${_shunit_msg_},${_shunit_skipped_}" | |
| - _shunit_msg_="${_shunit_msg_})" | |
| + _shunit_msg_="${_shunit_msg_})\033[0m\n" | |
| fi | |
| echo | |
| - echo ${_shunit_msg_} | |
| + printf '%b' "${_shunit_msg_}" | |
| __shunit_reportGenerated=${SHUNIT_TRUE} | |
| unset _shunit_failures_ _shunit_msg_ _shunit_ok_ _shunit_skipped_ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested with dash and bash