]> Dogcows Code - chaz/sbt-tap/blobdiff - src/main/scala/SbtTapReporting.scala
add a whitespace before stack trace
[chaz/sbt-tap] / src / main / scala / SbtTapReporting.scala
index 45510ac640ab887139f7d1c9b8f8919a648e4995..0d7f26b3a69eb32674b09790fe7c8e95942dd2db 100644 (file)
@@ -34,10 +34,13 @@ 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")
+          writeTapFields("ok", testId.incrementAndGet(), e.testName(), "#", "skip", e.testName())
       }
     }
   }
This page took 0.026488 seconds and 4 git commands to generate.