diff options
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r-- | plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt b/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt index bdb1af86..e6e1e105 100644 --- a/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt +++ b/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt @@ -4,11 +4,8 @@ import com.jetbrains.rd.util.first import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.model.DEnum import org.jetbrains.dokka.model.DModule -import org.jetbrains.dokka.model.doc.CodeBlock -import org.jetbrains.dokka.model.doc.CodeInline +import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.model.doc.P -import org.jetbrains.dokka.model.doc.Pre -import org.jetbrains.dokka.model.doc.Text import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import utils.* @@ -214,4 +211,42 @@ class JavadocParserTest : BaseAbstractTest() { } } } + + @Test + fun `html img tag`() { + val source = """ + |/src/main/kotlin/test/Test.java + |package example + | + | /** + | * <img src="/path/to/img.jpg" alt="Alt text"/> + | */ + | public class Test {} + """.trimIndent() + testInline( + source, + configuration, + ) { + documentablesCreationStage = { modules -> + val docs = modules.first().packages.first().classlikes.single().documentation.first().value + val root = docs.children.first().root + + kotlin.test.assertEquals( + listOf( + P( + children = listOf( + Img( + params = mapOf( + "href" to "/path/to/img.jpg", + "alt" to "Alt text" + ) + ) + ) + ) + ), + root.children + ) + } + } + } } |