Skip to content

Commit 7a71483

Browse files
committed
Add reproduction for #2682
1 parent f612c99 commit 7a71483

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/core/src/test/scala/org/scalasteward/core/edit/scalafix/ScalafixMigrationsFinderTest.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import org.scalasteward.core.util.Nel
99
class ScalafixMigrationsFinderTest extends FunSuite {
1010
test("findMigrations") {
1111
val update = ("org.typelevel".g % "cats-core".a % "2.1.0" %> "2.2.0").single
12-
val migrations = scalafixMigrationsFinder.findMigrations(update)
12+
val obtained = scalafixMigrationsFinder.findMigrations(update)
1313
val expected = (
1414
List(
1515
ScalafixMigration(
@@ -25,6 +25,13 @@ class ScalafixMigrationsFinderTest extends FunSuite {
2525
),
2626
List()
2727
)
28-
assertEquals(migrations, expected)
28+
assertEquals(obtained, expected)
29+
}
30+
31+
test("findMigrations: pattern must match whole artifactId") {
32+
val update = ("org.typelevel".g % "log4cats-core".a % "2.1.1" %> "2.4.0").single
33+
val obtained = scalafixMigrationsFinder.findMigrations(update)
34+
val expected = (List(), List())
35+
assertEquals(obtained, expected)
2936
}
3037
}

0 commit comments

Comments
 (0)