aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/format/javaLinkTagWithLabel.html25
-rw-r--r--test/data/format/javaLinkTagWithLabel.java8
-rw-r--r--test/data/format/linkWithLabel.html37
-rw-r--r--test/data/format/linkWithLabel.kt6
-rw-r--r--test/src/format/HtmlFormatTest.kt12
5 files changed, 88 insertions, 0 deletions
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 @@
+<HTML>
+<HEAD>
+<title>test / test.Foo</title>
+</HEAD>
+<BODY>
+<a href="test/index">test</a>&nbsp;/&nbsp;<a href="test/test/index">test</a>&nbsp;/&nbsp;<a href="test/test/-foo/index">Foo</a><br/>
+<br/>
+<h1>Foo</h1>
+<code><span class="keyword">open</span> <span class="keyword">class </span><span class="identifier">Foo</span></code><br/>
+<p>Call <code><a href="test/test/-foo/bar">this wonderful method</a></code> to do the job. </p>
+<br/>
+<br/>
+<h3>Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="test/test/-foo/bar">bar</a></td>
+<td>
+<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">bar</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
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 @@
+<HTML>
+<HEAD>
+<title>test / Bar</title>
+</HEAD>
+<BODY>
+<a href="test/index">test</a>&nbsp;/&nbsp;<a href="test/-bar/index">Bar</a><br/>
+<br/>
+<h1>Bar</h1>
+<code><span class="keyword">class </span><span class="identifier">Bar</span></code><br/>
+<p>Use <a href="test/-bar/foo">this method</a> for best results.</p>
+<br/>
+<br/>
+<h3>Constructors</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="test/-bar/-init-">&lt;init&gt;</a></td>
+<td>
+<code><span class="identifier">Bar</span><span class="symbol">(</span><span class="symbol">)</span></code><p>Use <a href="test/-bar/foo">this method</a> for best results.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<h3>Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<a href="test/-bar/foo">foo</a></td>
+<td>
+<code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
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" })
+ }
+ }
}