Skip to content

Commit

Permalink
fix main.define.test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Sep 16, 2024
1 parent 6d31805 commit 86912a9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions main/define/test/src/mill/define/BasePathTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ import mill.testkit.TestBaseModule
import utest._

object BasePathTests extends TestSuite {

object overriddenBasePath extends TestBaseModule {
override def millSourcePath = os.pwd / "overriddenBasePathRootValue"
object nested extends Module {
override def millSourcePath = super.millSourcePath / "overriddenBasePathNested"
object nested extends Module {
override def millSourcePath = super.millSourcePath / "overriddenBasePathDoubleNested"
}
}
}

val testGraphs = new TestGraphs
val tests = Tests {
def checkMillSourcePath[T <: Module](m: T)(f: T => Module, segments: String*): Unit = {
Expand Down Expand Up @@ -54,15 +65,6 @@ object BasePathTests extends TestSuite {
checkMillSourcePath(TestGraphs.nestedCrosses)(_.cross("210").cross2("js"), "cross", "cross2")
}
test("overridden") {
object overriddenBasePath extends TestBaseModule {
override def millSourcePath = os.pwd / "overriddenBasePathRootValue"
object nested extends Module {
override def millSourcePath = super.millSourcePath / "overriddenBasePathNested"
object nested extends Module {
override def millSourcePath = super.millSourcePath / "overriddenBasePathDoubleNested"
}
}
}
assert(
overriddenBasePath.millSourcePath == os.pwd / "overriddenBasePathRootValue",
overriddenBasePath.nested.millSourcePath == os.pwd / "overriddenBasePathRootValue/nested/overriddenBasePathNested",
Expand Down

0 comments on commit 86912a9

Please sign in to comment.