diff options
Diffstat (limited to 'core/src/test')
-rw-r--r-- | core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt | 4 | ||||
-rw-r--r-- | core/src/test/kotlin/model/CommentTest.kt | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt index 742d2908..2a9900af 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt @@ -20,6 +20,10 @@ class KotlinWebSiteRunnableSamplesFormatTest { verifyKWSNodeByName("sampleWithAsserts", "a") } + @Test fun newLinesInSamples() { + verifyKWSNodeByName("newLinesInSamples", "foo") + } + private fun verifyKWSNodeByName(fileName: String, name: String) { verifyOutput("testdata/format/website-samples/$fileName.kt", ".md", format = "kotlin-website-samples") { model, output -> kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.filter { it.name == name }) diff --git a/core/src/test/kotlin/model/CommentTest.kt b/core/src/test/kotlin/model/CommentTest.kt index 25fea48d..0d6a3374 100644 --- a/core/src/test/kotlin/model/CommentTest.kt +++ b/core/src/test/kotlin/model/CommentTest.kt @@ -153,22 +153,26 @@ line two""", toTestString()) with(model.members.single().members.first()) { assertEquals("Summary", content.summary.toTestString()) with (content.description) { - assertEqualsIgnoringSeparators("""[code lang=kotlin] + assertEqualsIgnoringSeparators(""" + |[code lang=kotlin] |if (true) { | println(property) |} |[/code] |[code lang=kotlin] + | |if (true) { | println(property) |} |[/code] |[code lang=kotlin] + | |if (true) { | println(property) |} |[/code] |[code lang=kotlin] + | |if (true) { | println(property) |} |