File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
modules/core/src/test/scala/org/scalasteward/core/edit Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -840,6 +840,31 @@ class RewriteTest extends FunSuite {
840840 runApplyUpdate(update, original, expected)
841841 }
842842
843+ test(" issue-2877: sbt using same version in a val and a literal" .fail) {
844+ val update = (" org.scalatest" .g % " scalatest" .a % " 3.2.13" %> " 3.2.14" ).single
845+ val original = Map (
846+ " build.sbt" ->
847+ """
848+ |val ScalaTestVersion = "3.2.13"
849+ |libraryDependencies ++= Seq(
850+ | "org.scalatest" %% "scalatest" % ScalaTestVersion,
851+ | "org.scalatest" %% "scalactic" % "3.2.13"
852+ |)
853+ |""" .stripMargin
854+ )
855+ val expected = Map (
856+ " build.sbt" ->
857+ """
858+ |val ScalaTestVersion = "3.2.14"
859+ |libraryDependencies ++= Seq(
860+ | "org.scalatest" %% "scalatest" % ScalaTestVersion,
861+ | "org.scalatest" %% "scalactic" % "3.2.14"
862+ |)
863+ |""" .stripMargin
864+ )
865+ runApplyUpdate(update, original, expected)
866+ }
867+
843868 private def runApplyUpdate (
844869 update : Update .Single ,
845870 files : Map [String , String ],
You can’t perform that action at this time.
0 commit comments