aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-04-28 16:17:10 +0200
committerDmitry Jemerov <yole@jetbrains.com>2016-04-28 16:17:10 +0200
commit1574339f6950c8662e9b480dc0c3f63403bfdfab (patch)
tree22a20f2b80eccbb4d31c4abadede2cda5a8312b2 /core
parent2e5b40d69e15c30474cf8564b08587f15ed8e383 (diff)
downloaddokka-1574339f6950c8662e9b480dc0c3f63403bfdfab.tar.gz
dokka-1574339f6950c8662e9b480dc0c3f63403bfdfab.tar.bz2
dokka-1574339f6950c8662e9b480dc0c3f63403bfdfab.zip
test to ensure KT-10998 doesn't happen in Dokka
Diffstat (limited to 'core')
-rw-r--r--core/src/test/kotlin/format/HtmlFormatTest.kt4
-rw-r--r--core/testdata/format/returnWithLink.html16
-rw-r--r--core/testdata/format/returnWithLink.kt4
3 files changed, 24 insertions, 0 deletions
diff --git a/core/src/test/kotlin/format/HtmlFormatTest.kt b/core/src/test/kotlin/format/HtmlFormatTest.kt
index 0fc56361..0b4f9958 100644
--- a/core/src/test/kotlin/format/HtmlFormatTest.kt
+++ b/core/src/test/kotlin/format/HtmlFormatTest.kt
@@ -164,6 +164,10 @@ class HtmlFormatTest {
verifyHtmlNode("markdownInLinks")
}
+ @Test fun returnWithLink() {
+ verifyHtmlNode("returnWithLink")
+ }
+
private fun verifyHtmlNode(fileName: String, withKotlinRuntime: Boolean = false) {
verifyOutput("testdata/format/$fileName.kt", ".html", withKotlinRuntime = withKotlinRuntime) { model, output ->
htmlService.appendNodes(tempLocation, output, model.members.single().members)
diff --git a/core/testdata/format/returnWithLink.html b/core/testdata/format/returnWithLink.html
new file mode 100644
index 00000000..e5827e8e
--- /dev/null
+++ b/core/testdata/format/returnWithLink.html
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<title>foo - test</title>
+</HEAD>
+<BODY>
+<a href="test/index">test</a>&nbsp;/&nbsp;<a href="test/foo">foo</a><br/>
+<br/>
+<h1>foo</h1>
+<a name="$foo(kotlin.String)"></a>
+<code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="identifier" id="$foo(kotlin.String)/s1">s1</span><span class="symbol">:</span>&nbsp;<span class="identifier">String</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code><br/>
+<p><strong>Return</strong><br/>
+Returns <a href="test/foo#$foo(kotlin.String)/s1">s1</a> and does nothing else.</p>
+<br/>
+<br/>
+</BODY>
+</HTML>
diff --git a/core/testdata/format/returnWithLink.kt b/core/testdata/format/returnWithLink.kt
new file mode 100644
index 00000000..63d1770c
--- /dev/null
+++ b/core/testdata/format/returnWithLink.kt
@@ -0,0 +1,4 @@
+/**
+ * @return Returns [s1] and does nothing else.
+ */
+fun foo(s1: String) = s1 \ No newline at end of file