aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-14 21:06:20 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-14 21:06:20 -0500
commite744a379caac8e1a6340bba97310531332868ef9 (patch)
treea2808558fbc2178948e8e2f2f1ebaaed5c85b345 /src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala
parent9671aaf060357a8aba35a11b05651885f100fa2a (diff)
downloadscala-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/harness/SummarizedTests.scala')
-rw-r--r--src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala b/src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala
index cd555dd..df20472 100644
--- a/src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala
+++ b/src/main/scala/com/iinteractive/test/harness/SummarizedTests.scala
@@ -21,13 +21,25 @@ trait SummarizedTests {
*
* @return The overall result of the test instance.
*/
- protected def runOneTest (test: Test, cb: TAPEvent => Unit): TAPResult = {
+ protected def runOneTest (
+ test: Test,
+ cb: TAPEvent => Unit,
+ combine: Boolean = false
+ ): TAPResult = {
val out = new PipedOutputStream
val in = new PipedInputStream(out)
+ val err = if (combine) out else Console.err
val testFuture = Future {
Console.withOut(out) {
- test.runInHarness
+ Console.withErr(err) {
+ if (combine) {
+ test.run
+ }
+ else {
+ test.runInHarness
+ }
+ }
}
out.close
}