From f3973480c0b03c9f28f05b5a4cf61bf3de3597bd Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 3 Mar 2015 19:51:43 +0100 Subject: support links with custom labels --- test/data/format/javaLinkTagWithLabel.html | 25 ++++++++++++++++++++ test/data/format/javaLinkTagWithLabel.java | 8 +++++++ test/data/format/linkWithLabel.html | 37 ++++++++++++++++++++++++++++++ test/data/format/linkWithLabel.kt | 6 +++++ test/src/format/HtmlFormatTest.kt | 12 ++++++++++ 5 files changed, 88 insertions(+) create mode 100644 test/data/format/javaLinkTagWithLabel.html create mode 100644 test/data/format/javaLinkTagWithLabel.java create mode 100644 test/data/format/linkWithLabel.html create mode 100644 test/data/format/linkWithLabel.kt (limited to 'test') diff --git a/test/data/format/javaLinkTagWithLabel.html b/test/data/format/javaLinkTagWithLabel.html new file mode 100644 index 00000000..ccf3c712 --- /dev/null +++ b/test/data/format/javaLinkTagWithLabel.html @@ -0,0 +1,25 @@ + + +test / test.Foo + + +test / test / Foo
+
+

Foo

+open class Foo
+

Call this wonderful method to do the job.

+
+
+

Functions

+ + + + + + + +
+bar +open fun bar(): Unit
+ + diff --git a/test/data/format/javaLinkTagWithLabel.java b/test/data/format/javaLinkTagWithLabel.java new file mode 100644 index 00000000..7226f1c9 --- /dev/null +++ b/test/data/format/javaLinkTagWithLabel.java @@ -0,0 +1,8 @@ +package test; + +/** + * Call {@link #bar() this wonderful method} to do the job. + */ +class Foo { + public void bar() +} diff --git a/test/data/format/linkWithLabel.html b/test/data/format/linkWithLabel.html new file mode 100644 index 00000000..75769ffd --- /dev/null +++ b/test/data/format/linkWithLabel.html @@ -0,0 +1,37 @@ + + +test / Bar + + +test / Bar
+
+

Bar

+class Bar
+

Use this method for best results.

+
+
+

Constructors

+ + + + + + + +
+<init> +Bar()

Use this method for best results.

+
+

Functions

+ + + + + + + +
+foo +fun foo(): Unit
+ + diff --git a/test/data/format/linkWithLabel.kt b/test/data/format/linkWithLabel.kt new file mode 100644 index 00000000..4a85c505 --- /dev/null +++ b/test/data/format/linkWithLabel.kt @@ -0,0 +1,6 @@ +/** + * Use [this method][Bar.foo] for best results. + */ +class Bar { + fun foo() {} +} diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt index 66eefe93..f8afab8f 100644 --- a/test/src/format/HtmlFormatTest.kt +++ b/test/src/format/HtmlFormatTest.kt @@ -106,6 +106,12 @@ public class HtmlFormatTest { } } + Test fun javaLinkTagWithLabel() { + verifyOutput("test/data/format/javaLinkTagWithLabel.java", ".html") { model, output -> + htmlService.appendNodes(tempLocation, output, model.members.single().members) + } + } + Test fun javaSeeTag() { verifyOutput("test/data/format/javaSeeTag.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) @@ -129,4 +135,10 @@ public class HtmlFormatTest { htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } } + + Test fun linkWithLabel() { + verifyOutput("test/data/format/linkWithLabel.kt", ".html") { model, output -> + htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) + } + } } -- cgit