File tree Expand file tree Collapse file tree 5 files changed +17
-142
lines changed
scalafix-tests/integration/src
test/scala/scalafix/tests/util Expand file tree Collapse file tree 5 files changed +17
-142
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ version=$1
66scala212=2.12.20
77scala213=2.13.17
88scala3LTS=3.3.7
9- scala3Next=3.7.3
9+ scala3Next=3.7.4
1010
1111cs resolve \
1212 ch.epfl.scala:scalafix-interfaces:$version \
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ object Dependencies {
1111 val scala33 = " 3.3.7"
1212 val scala35 = " 3.5.2"
1313 val scala36 = " 3.6.4"
14- val scala37 = " 3.7.3 "
14+ val scala37 = " 3.7.4-RC3 "
1515 val scala3LTS = scala33
1616 val scala3Next = sys.props.getOrElse(" scala3.nightly" , scala37)
1717
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -9,17 +9,27 @@ 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+ // Seq("x.y.z", "x.y", "x")
25+ val versions : Seq [String ] = BuildInfo .scalaVersion
26+ .split(" \\ ." )
27+ .inits
28+ .toSeq
29+ .init
30+ .map(_.mkString(" ." ))
31+
32+ versions.map(expectedPath).find(_.toFile.exists()).get
2333 }
2434 final implicit lazy val sdoc : SemanticDocument =
2535 BaseSemanticSuite .loadDoc(filename)
You can’t perform that action at this time.
0 commit comments