#!/bin/bash # tunit is short for "text unit", which is something I completely made # up. Every unit test is printed in the following format: # # [ TEST NAME ] ... [ OK | FAIL ] # # If COLOR=on, then the OK/FAIL bits are in RED or GREEN. TUNIT_FAILURES=0 TUNIT_ERRORS=0 TUNIT_TESTS=0 TUNIT_TIMERSTART=$(date "+%s") COLOR=${COLOR:-on} if [ "$COLOR" == "on" ]; then COLOR_GREEN=$(echo -e '\033[0;32;40m'); COLOR_RED=$(echo -e '\033[0;31;40m'); COLOR_NORMAL=$(echo -e '\033[0m'); else COLOR_GREEN="" COLOR_RED="" COLOR_NORMAL="" fi function tunit_header() { if [ "$1" == "--help" ]; then cat <