@@ -27,15 +27,47 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
2727 List (" ./mill" , " --version" )
2828 }
2929
30- List (" 0.10.0" ).foreach { version =>
30+ def scalaLibrary (scalaVersion : String ) =
31+ if (scalaVersion.startsWith(" 3" ))
32+ List (
33+ " maven:org.scala-lang:scala-library:2.13.8" ,
34+ " maven:org.scala-lang:scala3-library_3:3.1.3"
35+ ).mkString(" \n " )
36+ else if (scalaVersion.startsWith(" 2.13" ))
37+ " maven:org.scala-lang:scala-library:2.13.8"
38+ else if (scalaVersion.startsWith(" 2.12" ))
39+ " maven:org.scala-lang:scala-library:2.12.16"
40+ else
41+ " idn fail, we don't cover this scala version"
42+
43+ def scalaBinaryVersion (scalaVersion : String ) =
44+ if (scalaVersion.startsWith(" 3" ))
45+ " 3"
46+ else if (scalaVersion.startsWith(" 2.13" ))
47+ " 2.13"
48+ else if (scalaVersion.startsWith(" 2.12" ))
49+ " 2.12"
50+ else
51+ " idn fail, we don't cover this scala version"
52+
53+ val supportedMillVersions = List (" 0.10.0" )
54+ val supportedScalaVersion = List (" 2.12.16" , " 2.13.8" , " 3.1.3" )
55+
56+ val testGroupings =
57+ for {
58+ millVersion <- supportedMillVersions
59+ scalaVersion <- supportedScalaVersion
60+ } yield (millVersion, scalaVersion)
61+
62+ testGroupings.foreach { case (millVersion, scalaVersion) =>
3163 checkBuild(
32- s " minimal " ,
64+ s " minimal- ${millVersion} - ${scalaVersion} " ,
3365 s """ |/.mill-version
34- | ${version }
66+ | ${millVersion }
3567 |/build.sc
3668 |import mill._, scalalib._
3769 |object minimal extends ScalaModule {
38- | def scalaVersion = "2.13.8 "
70+ | def scalaVersion = " ${scalaVersion} "
3971 | object test extends Tests with TestModule.Munit {
4072 | def ivyDeps = Agg(ivy"org.scalameta::munit:1.0.0-M6")
4173 | }
@@ -53,13 +85,13 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
5385 | """ .stripMargin,
5486 expectedSemanticdbFiles = 2 ,
5587 expectedPackages =
56- """ |maven:junit:junit:4.13.2
57- |maven:org.hamcrest:hamcrest-core:1.3
58- |maven:org.scala-lang:scala-library:2.13.8
59- |maven:org.scala-sbt:test-interface:1.0
60- |maven:org.scalameta:junit-interface:1.0.0-M6
61- |maven:org.scalameta:munit_2.13 :1.0.0-M6
62- |""" .stripMargin,
88+ s """ |maven:junit:junit:4.13.2
89+ |maven:org.hamcrest:hamcrest-core:1.3
90+ | ${scalaLibrary(scalaVersion)}
91+ |maven:org.scala-sbt:test-interface:1.0
92+ |maven:org.scalameta:junit-interface:1.0.0-M6
93+ |maven:org.scalameta:munit_ ${scalaBinaryVersion(scalaVersion)} :1.0.0-M6
94+ | """ .stripMargin,
6395 initCommand = setupMill(),
6496 targetRoot = Some (" out/io/kipp/mill/scip/Scip/generate.dest" )
6597 )
0 commit comments