From 8fee6b74800ae2b7c07915e5ea7f9058e2df33d1 Mon Sep 17 00:00:00 2001 From: Manish Khettry Date: Wed, 25 Apr 2012 18:11:11 -0700 Subject: [PATCH] add a whitespace before stack trace --- src/main/scala/SbtTapReporting.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/scala/SbtTapReporting.scala b/src/main/scala/SbtTapReporting.scala index 966e3a2..0d7f26b 100644 --- a/src/main/scala/SbtTapReporting.scala +++ b/src/main/scala/SbtTapReporting.scala @@ -34,7 +34,10 @@ class SbtTapListener extends TestsListener { case TResult.Success => writeTapFields("ok", testId.incrementAndGet(), "-", e.testName()) case TResult.Error | TResult.Failure => writeTapFields("not ok", testId.incrementAndGet(), "-", e.testName()) - writeTapFields(stackTraceForError(e.error())) + // According to the TAP spec, as long as there is any kind of whitespace, this output should belong to the + // the test that failed and it should get displayed in the UI. + // TODO:It would be nice if we could report the exact line in the test where this happened. + writeTapFields(" ", stackTraceForError(e.error())) case TResult.Skipped => // it doesn't look like this framework distinguishes between pending and ignored. writeTapFields("ok", testId.incrementAndGet(), e.testName(), "#", "skip", e.testName()) -- 2.45.2