Skip to content

Commit

Permalink
bugfix/indentation-inside-string-templates(#758)
Browse files Browse the repository at this point in the history
### What's done:
  * Added a simple test
  • Loading branch information
aktsay6 committed Feb 9, 2021
1 parent 474f94f commit 496c9a3
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,5 +606,19 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) {
)
}

@Test
@Tag(WarningNames.WRONG_INDENTATION)
fun `test`() {
lintMethod(
"""
|fun foo(some: String) {
| val a = "${'$'}{
| expression
| }"
|}
""".trimMargin()
)
}

private fun warnText(expected: Int, actual: Int) = "${WRONG_INDENTATION.warnText()} expected $expected but was $actual"
}

0 comments on commit 496c9a3

Please sign in to comment.