From 1574339f6950c8662e9b480dc0c3f63403bfdfab Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 28 Apr 2016 16:17:10 +0200 Subject: test to ensure KT-10998 doesn't happen in Dokka --- core/src/test/kotlin/format/HtmlFormatTest.kt | 4 ++++ core/testdata/format/returnWithLink.html | 16 ++++++++++++++++ core/testdata/format/returnWithLink.kt | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 core/testdata/format/returnWithLink.html create mode 100644 core/testdata/format/returnWithLink.kt (limited to 'core') 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 @@ + + +foo - test + + +test / foo
+
+

foo

+ +fun foo(s1: String): String
+

Return
+Returns s1 and does nothing else.

+
+
+ + 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 -- cgit