From: Junio C Hamano Date: Sat, 23 Jul 2005 02:09:34 +0000 (-0700) Subject: [PATCH] Test framework: prettyprint the failed command. X-Git-Tag: v0.99.2~28 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=bf0dd8a8de9c4fc90f90bdcbce5ecf7e87a35b29;p=git.git [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 Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index d3f71d193..f97f8eb39 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 }