File tree Expand file tree Collapse file tree 4 files changed +14
-150
lines changed
scalafix-tests/integration/src
test/scala/scalafix/tests/util Expand file tree Collapse file tree 4 files changed +14
-150
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
241241 )
242242
243243 private val PreviousScalaVersion : Map [String , Option [String ]] = Map (
244+ scala37 -> Some (" 3.7.3" )
244245 )
245246
246247 override def buildSettings : Seq [Setting [_]] = List (
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -9,17 +9,25 @@ import scalafix.testkit.DiffAssertions
99import scalafix .tests .BuildInfo
1010import scalafix .tests .core .BaseSemanticSuite
1111import scalafix .v1 .SemanticDocument
12+ import scala .meta .internal .javacp .BaseType .S
1213
1314trait ExpectSuite extends AnyFunSuite with DiffAssertions {
1415 def filename : String
1516 def obtained (): String
1617
1718 final def path : AbsolutePath = {
18- val scalaMajorMinorVersion =
19- BuildInfo .scalaVersion.split('.' ).take(2 ).mkString(" ." )
20- AbsolutePath (s " ${BuildInfo .resourceDirectory}- ${scalaMajorMinorVersion}" )
21- .resolve(" expect" )
22- .resolve(filename.stripSuffix(" Test.scala" ) + " .expect" )
19+ def expectedPath (suffix : String ) =
20+ AbsolutePath (s " ${BuildInfo .resourceDirectory}- ${suffix}" )
21+ .resolve(" expect" )
22+ .resolve(filename.stripSuffix(" Test.scala" ) + " .expect" )
23+
24+ val versionPrefixesLongestFirst =
25+ BuildInfo .scalaVersion.split(" \\ ." ).inits.map(_.mkString(" ." ))
26+
27+ versionPrefixesLongestFirst
28+ .map(expectedPath)
29+ .find(_.toFile.exists())
30+ .get
2331 }
2432 final implicit lazy val sdoc : SemanticDocument =
2533 BaseSemanticSuite .loadDoc(filename)
You can’t perform that action at this time.
0 commit comments