diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-18 00:59:36 +0000 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-18 00:59:36 +0000 |
commit | 632f3d0340f66977fd59bb8d0a601a430dd3d0f5 (patch) | |
tree | 8d36a536f0a28fb31534e6fab514fcd4d50054cf /test | |
parent | 86552d373be1b2fbf3e11d1ed223ebc4bdb6b280 (diff) | |
download | cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.tar.gz cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.tar.bz2 cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.zip |
simplify and add features to reflective task lookup code
Code is much simpler now.
Now cbt sub-tasks are separated by . instead of spaces to
unify the syntax with method calls Scala. Also the reflective
code now works not only on builds but any kind of values,
so zero argument members of any types of return values can
simply be called.
This is also a large step towards detangling the reflective
lookup from cbt and turning it into a fully fletched
shell to Scala "native" call solution.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test.scala b/test/test.scala index d8714c0..5359029 100644 --- a/test/test.scala +++ b/test/test.scala @@ -68,8 +68,8 @@ object Main{ logger.test(res.toString) val debugToken = "usage " ++ path ++ " " assertSuccess(res,debugToken) - assert(res.out == "", debugToken ++ res.toString) - assert(res.err contains usageString, debugToken ++ res.toString) + //assert(res.out == "", res.err.toString) + assert(res.out contains usageString, usageString + " not found in " ++ res.toString) } def compile(path: String)(implicit logger: Logger) = task("compile", path) def task(name: String, path: String)(implicit logger: Logger) = { @@ -85,11 +85,11 @@ object Main{ val debugToken = "\n"++lib.red("Deleting") ++ " " ++ (cbtHome ++("/test/"++path++"/target")).toPath.toAbsolutePath.toString++"\n" val debugToken2 = "\n"++lib.red("Deleting") ++ " " ++ (cbtHome ++("/test/"++path)).toPath.toAbsolutePath.toString++"\n" assertSuccess(res,debugToken) - assert(res.out == "", debugToken ++ " " ++ res.toString) - assert(res.err.contains(debugToken), debugToken ++ " " ++ res.toString) + assert(res.out == "", "should be empty: " + res.out) + assert(res.err.contains(debugToken), debugToken ++ " missing from " ++ res.err.toString) assert( !res.err.contains(debugToken2), - "Tried to delete too much: " ++ debugToken2 ++ " " ++ res.toString + "Tried to delete too much: " ++ debugToken2 ++ " found in " ++ res.err.toString ) res.err.split("\n").filter(_.startsWith(lib.red("Deleting"))).foreach{ line => assert( |