diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/run-tests.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/run-tests.sh b/test/run-tests.sh index c6a7cce..87137fc 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -1,13 +1,17 @@ #!/bin/sh -EXECUTABLE="$PWD/../cue-bin-split" fail() { - echo "[FAIL] $i: $@" + echo -e '[\e[1;31mFAIL\e[0m] '$i: $@ exit 1 } +pass() +{ + echo -e '[\e[0;32mPASS\e[0m] '$i: $@ +} + check_expected() { [ -z $1 ] && echo WARN: check_expected called with no argument @@ -19,6 +23,8 @@ check_expected() fi } +pushd $(dirname $0) >/dev/null +EXECUTABLE="$PWD/../cue-bin-split" for i in *.test ; do pushd ${i} >/dev/null ( . ./run.sh ) 2>stderr.tmp >stdout.tmp @@ -29,8 +35,9 @@ for i in *.test ; do check_expected stdout check_expected stderr - echo "[PASS] $i" + pass $i rm std{err,out}.tmp popd >/dev/null done +popd >/dev/null |