diff options
author | Ignat Beresnev <ignat@beresnev.me> | 2021-12-14 10:09:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 10:09:10 +0300 |
commit | ed5d582b1a0f667c21443d1a493ff46bc5860865 (patch) | |
tree | 1733fe31493f742584763895f443f1874a4693ab /plugins/base/src/test/kotlin/renderers | |
parent | bf9d62a7a2bb510d8099bb2bba225b95c2c064f1 (diff) | |
parent | 19b2a2d5d0986fca3cf6766a05d09d7e458aa370 (diff) | |
download | dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.tar.gz dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.tar.bz2 dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.zip |
Merge pull request #2259 from Kotlin/2213-description-list-support
Description list support for JavaDocs (#2213)
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers')
-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..8b11dad1 --- /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") + ) + ) + } +} |