diff --git a/build.sc b/build.sc index 6bb698783e3..553391f5af1 100755 --- a/build.sc +++ b/build.sc @@ -938,8 +938,9 @@ object integration extends MillScalaModule { } override def forkArgs = testArgs() - def testMill: Target[PathRef] = T { - PathRef(installLocalTask(binFile = T.task((T.dest / "mill").toString()))()) + def testMill: Target[PathRef] = { + val name = if (scala.util.Properties.isWin) "mill.bat" else "mill" + T { PathRef(installLocalTask(binFile = T.task((T.dest / name).toString()))()) } } trait Tests extends super.Tests { diff --git a/integration/local/src/DocAnnotationsTests.scala b/integration/local/src/DocAnnotationsTests.scala index 1b7e2816f6f..3680f006245 100644 --- a/integration/local/src/DocAnnotationsTests.scala +++ b/integration/local/src/DocAnnotationsTests.scala @@ -10,7 +10,8 @@ class DocAnnotationsTests(fork: Boolean) extends ScriptTestSuite(fork) { val tests = Tests { initWorkspace() "test" - { - assert(eval("inspect", "core.test.ivyDeps")) + val res = eval("inspect", "core.test.ivyDeps") + assert(res == true) val inheritedIvyDeps = ujson.read(meta("inspect"))("value").str assert( inheritedIvyDeps.contains("core.test.ivyDeps"), diff --git a/integration/local/src/HygieneTests.scala b/integration/local/src/HygieneTests.scala index cae9b4546c8..a902452de4f 100644 --- a/integration/local/src/HygieneTests.scala +++ b/integration/local/src/HygieneTests.scala @@ -5,14 +5,17 @@ import utest._ class HygieneTests(fork: Boolean) extends ScriptTestSuite(fork) { override def workspaceSlug: String = "hygiene" - override def workspacePath: os.Path = os.Path(sys.props.getOrElse("MILL_WORKSPACE_PATH", ???)) / getClass().getName() - override def scriptSourcePath: os.Path = os.pwd / "integration" / "local" / "resources" / workspaceSlug + override def workspacePath: os.Path = + os.Path(sys.props.getOrElse("MILL_WORKSPACE_PATH", ???)) / getClass().getName() + override def scriptSourcePath: os.Path = + os.pwd / "integration" / "local" / "resources" / workspaceSlug val tests = Tests { initWorkspace() test { - assert(eval("scala.foo")) + val res = eval("scala.foo") + assert(res == true) val output = meta("scala.foo") assert(output.contains("\"fooValue\"")) }