Tests: Add helper functions for printing status and banner
authorChristian Babeux <christian.babeux@efficios.com>
Mon, 24 Sep 2012 16:11:45 +0000 (12:11 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 24 Sep 2012 20:26:12 +0000 (16:26 -0400)
commitfec81a7e6e7d21bef1a16643404ac5016009feb3
tree8ba54f517fb96778254ab34740be617ab2e6303c
parent2d7e012dc1d47b55bf37e05d9c2a76bad7620e31
Tests: Add helper functions for printing status and banner

Add three new printing functions:

print_ok: Print the OK status with optional color support.
print_fail: Print the FAIL status with optional color support.
print_test_banner: Print a test banner of the test description.

e.g.:
sometest.sh:
TEST_DESC="A really useful test"
[...]
source $TESTDIR/utils.sh
print_test_banner $TEST_DESC
[...]
print_ok
print_fail
[...]

$ ./sometest.sh
----------------------
A really useful test
----------------------
OK
FAIL

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/utils.sh
This page took 0.025042 seconds and 4 git commands to generate.