Skip to content

Commit

Permalink
Merge pull request #36 from SnipMeDev/fix/keyword-in-phrase-at-start
Browse files Browse the repository at this point in the history
Created test case for potentiall error
  • Loading branch information
tmaxxdd authored Apr 28, 2024
2 parents d91d955 + ef03e28 commit bfc1d90
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ internal class KeywordLocatorTest {
assertEquals(0, result.size)
}

@Test
fun `Not returns location of keyword inside phrase from start`() {
val testCode = """
val intent = 0
""".trimIndent()
val keywords = listOf("int")

val result = KeywordLocator.locate(testCode, keywords)

assertEquals(0, result.size)
}

@Test
fun `Not returns keywords from single comment`() {
val testCode = """
Expand Down

0 comments on commit bfc1d90

Please sign in to comment.