diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-03-14 21:06:20 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-03-14 21:06:20 -0500 |
commit | e744a379caac8e1a6340bba97310531332868ef9 (patch) | |
tree | a2808558fbc2178948e8e2f2f1ebaaed5c85b345 /src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala | |
parent | 9671aaf060357a8aba35a11b05651885f100fa2a (diff) | |
download | scala-test-more-e744a379caac8e1a6340bba97310531332868ef9.tar.gz scala-test-more-e744a379caac8e1a6340bba97310531332868ef9.zip |
pass -v as an option to test-only to also display tap
note that you need to run the command line like this:
sbt "test-only com.iinteractive.test.TestMoreTest -- -v"
fixes gh-3
Diffstat (limited to 'src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala')
-rw-r--r-- | src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala b/src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala index 34df60d..e948591 100644 --- a/src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala +++ b/src/main/scala/com/iinteractive/test/sbt/SBTReporter.scala @@ -3,14 +3,15 @@ package com.iinteractive.test.sbt import org.scalatools.testing import com.iinteractive.test.harness.{Reporter,SummarizedTests} -import com.iinteractive.test.tap.{TAPEvent,ResultEvent,EndEvent} +import com.iinteractive.test.tap.{TAPEvent,ResultEvent,EndEvent,LineEvent} import com.iinteractive.test.Test /** Runs a single test under the SBT test harness. */ class SBTReporter ( loader: ClassLoader, loggers: Array[testing.Logger], - eventHandler: testing.EventHandler + eventHandler: testing.EventHandler, + verbose: Boolean ) extends Reporter with SummarizedTests { def run (testName: String): Int = { val cb = (e: TAPEvent) => e match { @@ -72,12 +73,18 @@ class SBTReporter ( logError("FAIL " + testName + " " + errors) } } + case LineEvent(line) => { + if (verbose) { + logInfo(line.toString) + } + } case _ => () } runOneTest( loader.loadClass(testName).newInstance.asInstanceOf[Test], - cb + cb, + verbose ).exitCode } |