diff options
author | Junichi Uekawa <dancer@netfort.gr.jp> | 2008-08-11 23:58:12 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2008-08-11 23:58:12 +0900 |
commit | 4e6812f6b926d0f6560b67846becc2c546db1ab0 (patch) | |
tree | 87437804edee26b489db43f75ce56eb94e1623dd | |
parent | f4494dca6f9d64baf4757b45f2d69da2a752b23b (diff) | |
download | pbuilder-4e6812f6b926d0f6560b67846becc2c546db1ab0.tar pbuilder-4e6812f6b926d0f6560b67846becc2c546db1ab0.tar.gz |
change output of testsuite to be less verbose.
-rw-r--r-- | testlib.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -11,8 +11,7 @@ TESTLIB_TESTS=0 testlib_echo() { case "$1" in OK) - shift - echo "[OK ]" "$@" >&2 + # no output is probably good. ;; FAIL) shift @@ -24,10 +23,11 @@ testlib_echo() { } testlib_summary() { - echo "Ran ${TESTLIB_TESTS} tests and ${TESTLIB_FAILS} failed" + echo "$0: Ran ${TESTLIB_TESTS} tests and $((TESTLIB_TESTS - TESTLIB_FAILS)) succeeded, ${TESTLIB_FAILS} failed" if [ $TESTLIB_FAILS != 0 ]; then echo '=================' echo 'Testsuite FAILED!' + echo " $0" echo '=================' exit 1 fi @@ -69,6 +69,7 @@ expect_output() { } # Write your functions test_xxxx and call them at the end with their expected result code: +# . ./testlib.sh # expect_success test_success # expect_success test_fail # expect_success test_options "hello world" |