summaryrefslogtreecommitdiff
path: root/scalaplugin
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-11-26 22:16:37 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2017-11-27 07:30:13 -0800
commitc6d95ab024831bd5f12d9aff2cacc361b9acfa1c (patch)
tree6cc474f487ffcd028f8769ebed2eaea1a9be579f /scalaplugin
parenteb0f0a5c4426f218a7f2c4972831a0b3d048e500 (diff)
downloadmill-c6d95ab024831bd5f12d9aff2cacc361b9acfa1c.tar.gz
mill-c6d95ab024831bd5f12d9aff2cacc361b9acfa1c.tar.bz2
mill-c6d95ab024831bd5f12d9aff2cacc361b9acfa1c.zip
Tweak readme, fix SBT executable assembly prefix
Diffstat (limited to 'scalaplugin')
-rw-r--r--scalaplugin/src/test/scala/mill/scalaplugin/AcyclicTests.scala17
1 files changed, 9 insertions, 8 deletions
diff --git a/scalaplugin/src/test/scala/mill/scalaplugin/AcyclicTests.scala b/scalaplugin/src/test/scala/mill/scalaplugin/AcyclicTests.scala
index 4f41de9a..1f0bbd7e 100644
--- a/scalaplugin/src/test/scala/mill/scalaplugin/AcyclicTests.scala
+++ b/scalaplugin/src/test/scala/mill/scalaplugin/AcyclicTests.scala
@@ -62,8 +62,9 @@ object AcyclicTests extends TestSuite{
val packageScala = workspacePath/'src/'main/'scala/'acyclic/"package.scala"
'acyclic - {
+ val scalaVersion = "2.12.4"
// We can compile
- val Right((pathRef, evalCount)) = eval(AcyclicBuild.acyclic("2.12.4").compile)
+ val Right((pathRef, evalCount)) = eval(AcyclicBuild.acyclic(scalaVersion).compile)
val outputPath = pathRef.path
val outputFiles = ls.rec(outputPath)
assert(
@@ -73,33 +74,33 @@ object AcyclicTests extends TestSuite{
)
// Compilation is cached
- val Right((_, evalCount2)) = eval(AcyclicBuild.acyclic("2.12.4").compile)
+ val Right((_, evalCount2)) = eval(AcyclicBuild.acyclic(scalaVersion).compile)
assert(evalCount2 == 0)
write.append(packageScala, "\n")
// Caches are invalidated if code is changed
- val Right((_, evalCount3)) = eval(AcyclicBuild.acyclic("2.12.4").compile)
+ val Right((_, evalCount3)) = eval(AcyclicBuild.acyclic(scalaVersion).compile)
assert(evalCount3 > 0)
// Compilation can fail on broken code, and work when fixed
write.append(packageScala, "\n}}")
- val Left(Result.Exception(ex)) = eval(AcyclicBuild.acyclic("2.12.4").compile)
+ val Left(Result.Exception(ex)) = eval(AcyclicBuild.acyclic(scalaVersion).compile)
assert(ex.isInstanceOf[sbt.internal.inc.CompileFailed])
write.write(packageScala, read(packageScala).dropRight(3))
- val Right(_) = eval(AcyclicBuild.acyclic("2.12.4").compile)
+ val Right(_) = eval(AcyclicBuild.acyclic(scalaVersion).compile)
// Tests compile & run
- val Right(_) = eval(AcyclicBuild.acyclic("2.12.4").test.forkTest())
+ val Right(_) = eval(AcyclicBuild.acyclic(scalaVersion).test.forkTest())
// Tests can be broken
write.append(packageScala, "\n}}")
- val Left(_) = eval(AcyclicBuild.acyclic("2.12.4").test.forkTest())
+ val Left(_) = eval(AcyclicBuild.acyclic(scalaVersion).test.forkTest())
// Tests can be fixed
write.write(packageScala, read(packageScala).dropRight(3))
- val Right(_) = eval(AcyclicBuild.acyclic("2.12.4").test.forkTest())
+ val Right(_) = eval(AcyclicBuild.acyclic(scalaVersion).test.forkTest())
}
}