aboutsummaryrefslogtreecommitdiff
path: root/test/src/format/PackageDocsTest.kt
blob: 6815de6fe574ea0a03f49e17435bd67b00d93c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.jetbrains.dokka.tests.format

import org.jetbrains.dokka.ContentBlock
import org.jetbrains.dokka.ContentText
import org.jetbrains.dokka.DokkaConsoleLogger
import org.jetbrains.dokka.PackageDocs
import org.junit.Test
import kotlin.test.assertEquals

public class PackageDocsTest {
    @Test fun verifyParse() {
        val docs = PackageDocs(null, null, DokkaConsoleLogger)
        docs.parse("test/data/packagedocs/stdlib.md")
        val packageContent = docs.packageContent["kotlin"]!!
        val block = (packageContent.children.single() as ContentBlock).children.first() as ContentText
        assertEquals("Core functions and types", block.text)
    }
}