diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-30 21:21:05 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-30 21:21:05 -0400 |
commit | 8a4578311e4d11c06bfb4fe04e5bf414b94d24e8 (patch) | |
tree | 249122a1a85ca0e86001fb6cc51e8278cf9fe2a3 /test | |
parent | 8abb5c3ca85abc4d206afe39a2c4a98bc17560ba (diff) | |
download | cbt-8a4578311e4d11c06bfb4fe04e5bf414b94d24e8.tar.gz cbt-8a4578311e4d11c06bfb4fe04e5bf414b94d24e8.tar.bz2 cbt-8a4578311e4d11c06bfb4fe04e5bf414b94d24e8.zip |
Typed passing of values from Stage1 to Stage2
(thing can still be cleaned up)
Diffstat (limited to 'test')
-rw-r--r-- | test/test.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test.scala b/test/test.scala index e623d34..7261287 100644 --- a/test/test.scala +++ b/test/test.scala @@ -4,9 +4,9 @@ import scala.collection.immutable.Seq // micro framework object Main{ - def main(args: Array[String]): Unit = { - val init = new Init(args) - implicit val logger: Logger = init.logger + def main(_args: Array[String]): Unit = { + val args = new Stage1ArgsParser(_args.toVector) + implicit val logger: Logger = new Logger(args.enabledLoggers) var successes = 0 var failures = 0 @@ -24,9 +24,9 @@ object Main{ }.get } - def runCbt(path: String, args: Seq[String])(implicit logger: Logger): Result = { + def runCbt(path: String, _args: Seq[String])(implicit logger: Logger): Result = { import java.io._ - val allArgs: Seq[String] = ((cbtHome.string ++ "/cbt") +: "direct" +: (args ++ init.propsRaw)) + val allArgs: Seq[String] = ((cbtHome.string ++ "/cbt") +: "direct" +: (_args ++ args.propsRaw)) logger.test(allArgs.toString) val pb = new ProcessBuilder( allArgs :_* ) pb.directory(cbtHome ++ ("/test/" ++ path)) @@ -61,7 +61,7 @@ object Main{ // assert(res.err == "", res.err) // FIXME: enable this } - logger.test( "Running tests " ++ args.toList.toString ) + logger.test( "Running tests " ++ _args.toList.toString ) usage("nothing") compile("nothing") |