aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-06-14 12:21:40 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-06-14 12:21:40 -0400
commite3262d4e4f8b83cac6f1b2a0558af3e30073ec2a (patch)
tree293f6094560094ff5580ba62e4a2d07e02e86a7d /test
parent66c3d62ebb08eb0054ade9b98dc7a477976117b7 (diff)
parent3df15ef7c9c5a48516c06cf7b598acf298d8b8c0 (diff)
downloadcbt-e3262d4e4f8b83cac6f1b2a0558af3e30073ec2a.tar.gz
cbt-e3262d4e4f8b83cac6f1b2a0558af3e30073ec2a.tar.bz2
cbt-e3262d4e4f8b83cac6f1b2a0558af3e30073ec2a.zip
Merge remote-tracking branch 'origin/master' into kind-projector-plugin
Diffstat (limited to 'test')
-rw-r--r--test/test.scala17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/test.scala b/test/test.scala
index 81a164f..55ce205 100644
--- a/test/test.scala
+++ b/test/test.scala
@@ -35,8 +35,15 @@ object Main{
val p = pb.start
val out = new java.io.InputStreamReader(p.getInputStream)
val errors = Iterator.continually(out.read).takeWhile(_ != -1).map(_.toChar).mkString
- if( p.waitFor != 0 ){
- throw new Exception("Linting error in ./cbt bash launcher script:\n" + errors)
+ p.waitFor() match {
+ case 0 =>
+ ()
+
+ case 127 => // bash exit code: not found
+ System.err.println( "Shellcheck not found. Your build may fail during ci-build" )
+
+ case _ =>
+ throw new Exception( "Linting error in ./cbt bash launcher script:\n" + errors )
}
} else System.err.println( "Skipping shellcheck" )
@@ -422,6 +429,12 @@ object Main{
}
{
+ val res = runCbt("../examples/new-style-macros-example", Seq("run"))
+ assert(res.exit0)
+ assert(res.out.contains("hello, world!"), res.out)
+ }
+
+ {
val res = runCbt("../examples/resources-example", Seq("run"))
assert(res.exit0)
assert(res.out.contains("via parent.parent: false 0"), res.out)