From 3d416fec95e741289b02bf4a4b2e0fdf06de0aea Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 25 Aug 2021 09:41:01 +0200 Subject: Fix breakable labels and icon on single module project --- .../kotlin/renderers/html/FormattingUtilsTest.kt | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'plugins/base/src/test') diff --git a/plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt b/plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt index fa1e30f6..c77a78fb 100644 --- a/plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/FormattingUtilsTest.kt @@ -31,7 +31,43 @@ class FormattingUtilsTest { val testedText = "Package org.jetbrains.dokka.it.moduleC" val expectedHtml = """ - Package org.jetbrains.dokka.it.moduleC + Package org.jetbrains.dokka.it.moduleC + + """.trimIndent() + + val html = createHTML(prettyPrint = true).html { + body { + buildBreakableText(testedText) + } + } + + assertEquals(expectedHtml.trim(), html.trim()) + } + + @Test + fun `should build breakable text for text with braces`(){ + val testedText = "[Common]kotlinx.collections.immutable" + val expectedHtml = """ + + [Common]kotlinx.collections.immutable + + """.trimIndent() + + val html = createHTML(prettyPrint = true).html { + body { + buildBreakableText(testedText) + } + } + + assertEquals(expectedHtml.trim(), html.trim()) + } + + @Test + fun `should build breakable text for camel case notation`(){ + val testedText = "DokkkkkkkaIsTheBest" + val expectedHtml = """ + + DokkkkkkkaIsTheBest """.trimIndent() -- cgit