diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2021-12-06 16:20:51 +0300 |
---|---|---|
committer | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2021-12-06 16:20:51 +0300 |
commit | c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1 (patch) | |
tree | d9c20d2118d6679175ef8ab9f7dfc6d49aba5af3 /plugins/base/src/test/kotlin/renderers/html | |
parent | 35a69e0322fcd271dccadcc2ee8cbb61dcafe62e (diff) | |
download | dokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.tar.gz dokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.tar.bz2 dokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.zip |
Description list support for JavaDocs (#2213)
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers/html')
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt b/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt new file mode 100644 index 00000000..d578ba5e --- /dev/null +++ b/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt @@ -0,0 +1,41 @@ +package renderers.html + +import org.jetbrains.dokka.base.renderers.html.HtmlRenderer +import org.jetbrains.dokka.pages.ListStyle +import org.junit.jupiter.api.Test +import renderers.testPage +import utils.Dd +import utils.Dl +import utils.Dt +import utils.match + + +class ListStylesTest : HtmlRenderingOnlyTestBase() { + + @Test + fun `description list render`() { + val page = testPage { + descriptionList { + item(styles = setOf(ListStyle.DescriptionTerm)) { + text("Description term #1") + } + item(styles = setOf(ListStyle.DescriptionTerm)) { + text("Description term #2") + } + item(styles = setOf(ListStyle.DescriptionDetails)) { + text("Description details describing terms #1 and #2") + } + } + } + + + HtmlRenderer(context).render(page) + renderedContent.match( + Dl( + Dt("Description term #1"), + Dt("Description term #2"), + Dd("Description details describing terms #1 and #2") + ) + ) + } +}
\ No newline at end of file |