package org.jetbrains.dokka.tests
import markdown.KDocTest
import org.intellij.markdown.MarkdownElementTypes
import org.jetbrains.dokka.model.doc.*
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
class ParserTest : KDocTest() {
@Test
fun `Simple text`() {
val kdoc = """
| This is simple test of string
| Next line
""".trimMargin()
val expectedDocumentationNode = DocumentationNode(
listOf(
Description(
CustomDocTag(
listOf(P(listOf(Text("This is simple test of string Next line")))),
name = MarkdownElementTypes.MARKDOWN_FILE.name
)
)
)
)
executeTest(kdoc, expectedDocumentationNode)
}
@Test
fun `Simple text with new line`() {
val kdoc = """
| This is simple test of string\
| Next line
""".trimMargin()
val expectedDocumentationNode = DocumentationNode(
listOf(
Description(
CustomDocTag(
listOf(
P(
listOf(
Text("This is simple test of string"),
Br,
Text("Next line")
)
)
),
name = MarkdownElementTypes.MARKDOWN_FILE.name
)
)
)
)