From 1cd999158783a1432873bbedecf6d1dcfafe6691 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Wed, 27 Jan 2016 10:17:33 +0000 Subject: [PATCH] print stdout for tap and not-tap --- urchin | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/urchin b/urchin index 38c95f6..3a2e1cc 100755 --- a/urchin +++ b/urchin @@ -106,6 +106,11 @@ recurse() { fi echo "${not}ok $((n + 1)) - ${skip}${potential_test}" echo "${result} ${potential_test}" >> "$logfile" + if [ "$result" == fail ]; then + echo '# ------------ Begin output ------------' + sed 's/^/# /' "$stdout_file" + echo '# ------------ End output ------------' + fi else indent $indent_level case "$result" in @@ -121,7 +126,7 @@ recurse() { printf '%s\n' "${potential_test}" printf '%s\n' "${potential_test} failed" >> "$logfile" printf '\033[31m' # Print output captured from failed test in red. - sed 's/^/# /' "$stdout_file" + cat "$stdout_file" printf '\033[0m' ;; skip)