aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-07-12 12:21:40 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-09-13 14:48:44 +0100
commitf8b2f559453bc3b1491e805f81db7c5920401734 (patch)
tree432d47a1793fb93c5f7e1b6b79b52c71e05c9c8a /test
parent356ff2ec817dbc65f27ec37e644204359ec84210 (diff)
downloadcbt-f8b2f559453bc3b1491e805f81db7c5920401734.tar.gz
cbt-f8b2f559453bc3b1491e805f81db7c5920401734.tar.bz2
cbt-f8b2f559453bc3b1491e805f81db7c5920401734.zip
fix task name appearing in args (#132)
Diffstat (limited to 'test')
-rw-r--r--test/simple/build/build.scala2
-rw-r--r--test/test.scala6
2 files changed, 8 insertions, 0 deletions
diff --git a/test/simple/build/build.scala b/test/simple/build/build.scala
index cf41c8c..66ee392 100644
--- a/test/simple/build/build.scala
+++ b/test/simple/build/build.scala
@@ -35,4 +35,6 @@ class Build(val context: cbt.Context) extends BaseBuild{
"ai.x" %% "lens" % "1.0.0"
)
)
+
+ def printArgs = context.args.mkString(" ")
}
diff --git a/test/test.scala b/test/test.scala
index 65790f8..4f332ea 100644
--- a/test/test.scala
+++ b/test/test.scala
@@ -197,6 +197,12 @@ object Main{
compile("../examples/uber-jar-example")
{
+ val res = runCbt("simple", Seq("printArgs","1","2","3"))
+ assert(res.exit0)
+ assert(res.out == "1 2 3", res.out)
+ }
+
+ {
val res = runCbt("forgot-extend", Seq("run"))
assert(!res.exit0)
assert(res.err contains "Build cannot be cast to cbt.BuildInterface", res.err)