aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/markdown/LinkTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/markdown/LinkTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/markdown/LinkTest.kt33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/markdown/LinkTest.kt b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
index 6e0f47ed..2bcc0bf0 100644
--- a/plugins/base/src/test/kotlin/markdown/LinkTest.kt
+++ b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
@@ -6,6 +6,7 @@ import org.jetbrains.dokka.pages.ClasslikePageNode
import org.jetbrains.dokka.pages.ContentDRILink
import org.jetbrains.dokka.pages.MemberPageNode
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
+import org.jetbrains.dokka.model.doc.DocumentationLink
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
@@ -78,4 +79,36 @@ class LinkTest : BaseAbstractTest() {
}
}
}
+
+ @Test
+ fun `link to parameter #238`() {
+ val configuration = dokkaConfiguration {
+ sourceSets {
+ sourceSet {
+ sourceRoots = listOf("src/")
+ }
+ }
+ }
+
+ testInline(
+ """
+ |/src/main/kotlin/Test.kt
+ |package example
+ |
+ |/**
+ |* Link to [waitAMinute]
+ |*/
+ |fun stop(hammerTime: String, waitAMinute: String) {}
+ |
+ """.trimMargin(),
+ configuration
+ ) {
+ documentablesMergingStage = { module ->
+ val parameter = module.dfs { it.name == "waitAMinute" }
+ val link = module.dfs { it.name == "stop" }!!.documentation.values.single().dfs { it is DocumentationLink } as DocumentationLink
+
+ assertEquals(parameter!!.dri, link.dri)
+ }
+ }
+ }
}