Git development
 help / color / mirror / Atom feed
* [PATCH] Test framework: prettyprint the failed command.
@ 2005-07-23  2:09 Junio C Hamano
  0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2005-07-23  2:09 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

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>
---

 t/test-lib.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

ba7b8ae0b3af6040c8af2f4e381bd4c30ab9cd24
diff --git a/t/test-lib.sh b/t/test-lib.sh
--- 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
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-23  2:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-23  2:09 [PATCH] Test framework: prettyprint the failed command Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox