Skip to content

Commit

Permalink
Test the root cause of #3206
Browse files Browse the repository at this point in the history
  • Loading branch information
fthomas committed Nov 11, 2023
1 parent 290eabd commit cdb6df0
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ class ModulePositionScannerTest extends FunSuite {
)
assertEquals(obtained, expected)
}

test("sbt module where the artifactId is also part of the groupId") {
val d = "com.typesafe.play".g % "play".a % "2.9.0"
val fd =
FileData("build.sbt", s""""com.typesafe.play" %% "play" % "2.9.0"""")
val obtained = ModulePositionScanner.findPositions(d, fd)
val expected = List(
ModulePosition(
Substring.Position(fd.path, 1, d.groupId.value),
Substring.Position(fd.path, 24, d.artifactId.name),
Substring.Position(fd.path, 32, s"\"${d.version}\"")
)
)
assertEquals(obtained, expected)
}
}

0 comments on commit cdb6df0

Please sign in to comment.