File tree Expand file tree Collapse file tree 4 files changed +13
-150
lines changed
scalafix-tests/integration/src
test/scala/scalafix/tests/util Expand file tree Collapse file tree 4 files changed +13
-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 @@ -15,11 +15,18 @@ trait ExpectSuite extends AnyFunSuite with DiffAssertions {
1515 def obtained (): String
1616
1717 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" )
18+ def expectedPath (suffix : String ) =
19+ AbsolutePath (s " ${BuildInfo .resourceDirectory}- ${suffix}" )
20+ .resolve(" expect" )
21+ .resolve(filename.stripSuffix(" Test.scala" ) + " .expect" )
22+
23+ val versionPrefixesLongestFirst =
24+ BuildInfo .scalaVersion.split(" \\ ." ).inits.map(_.mkString(" ." ))
25+
26+ versionPrefixesLongestFirst
27+ .map(expectedPath)
28+ .find(_.toFile.exists())
29+ .get
2330 }
2431 final implicit lazy val sdoc : SemanticDocument =
2532 BaseSemanticSuite .loadDoc(filename)
You can’t perform that action at this time.
0 commit comments