diff options
author | Junio C Hamano <junkio@cox.net> | 2005-07-22 19:09:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-22 20:34:16 -0700 |
commit | bf0dd8a8de9c4fc90f90bdcbce5ecf7e87a35b29 (patch) | |
tree | 816374ed3bbaa59abef4d1407fef541685568997 | |
parent | [PATCH] Install tools with "make install-tools". (diff) | |
download | tgif-bf0dd8a8de9c4fc90f90bdcbce5ecf7e87a35b29.tar.xz |
[PATCH] Test framework: prettyprint the failed command.
The output from a failure case had the test description message
and the first line of the actual test script concatenated on the
same line, which was ugly. Correct the output routine a bit to
make it more readable.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-x | t/test-lib.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index d3f71d1932..f97f8eb395 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -84,7 +84,9 @@ test_ok_ () { test_failure_ () { test_count=$(expr "$test_count" + 1) test_failure=$(expr "$test_failure" + 1); - say "FAIL $test_count: $@" + say "FAIL $test_count: $1" + shift + echo "$@" | sed -e 's/^/ /' test "$immediate" == "" || exit 1 } |