sbt/citest/build.sbt

23 lines
663 B
Plaintext
Raw Normal View History

2017-12-14 06:09:56 +01:00
lazy val check = taskKey[Unit]("")
lazy val root = (project in file("."))
.settings(
scalaVersion := "2.12.4",
name := "Hello",
check := {
val xs = IO.readLines(file("output.txt")).toVector
println(xs)
assert(xs(0) startsWith "[info] Loading project definition")
assert(xs(1) startsWith "[info] Loading settings")
assert(xs(2) startsWith "[info] Set current project to Hello")
assert(xs(3) startsWith "[info] This is sbt")
assert(xs(4) startsWith "[info] The current project")
2017-12-14 06:09:56 +01:00
2018-01-08 16:17:38 +01:00
val ys = IO.readLines(file("err.txt")).toVector.distinct
2017-12-14 06:09:56 +01:00
2019-05-23 18:42:19 +02:00
assert(ys.isEmpty, s"there's an stderr: $ys")
2017-12-14 06:09:56 +01:00
}
)