aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-16 19:17:13 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-16 19:17:13 +0100
commit18bd85cc710718658d6c902c04de5d356cd0aee8 (patch)
treefcecd542c10b764a8120cd839db47c25f8eba386 /test
parent0f7f49d4828b618d0f5ea0475d15f7498b61f6de (diff)
parentd093fc192beab22086506240fbe7747663cc73fa (diff)
downloaddokka-18bd85cc710718658d6c902c04de5d356cd0aee8.tar.gz
dokka-18bd85cc710718658d6c902c04de5d356cd0aee8.tar.bz2
dokka-18bd85cc710718658d6c902c04de5d356cd0aee8.zip
Merge pull request #22 from orangy/broken-links
don't generate broken links if a doc comment references an unresolved symbol
Diffstat (limited to 'test')
-rw-r--r--test/data/format/brokenLink.html12
-rw-r--r--test/data/format/brokenLink.kt4
-rw-r--r--test/src/format/HtmlFormatTest.kt6
3 files changed, 22 insertions, 0 deletions
diff --git a/test/data/format/brokenLink.html b/test/data/format/brokenLink.html
new file mode 100644
index 00000000..d5f8707f
--- /dev/null
+++ b/test/data/format/brokenLink.html
@@ -0,0 +1,12 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<a href="out.html">test</a>&nbsp;/&nbsp;<a href="out.html"></a>&nbsp;/&nbsp;<a href="out.html">f</a><br/>
+<br/>
+<h1>f</h1>
+<pre><code><span class="keyword">fun </span><span class="identifier">f</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></pre><p>This references <a href="#">noSuchIdentifier</a>.</p>
+<br/>
+<br/>
+</BODY>
+</HTML>
diff --git a/test/data/format/brokenLink.kt b/test/data/format/brokenLink.kt
new file mode 100644
index 00000000..268a986e
--- /dev/null
+++ b/test/data/format/brokenLink.kt
@@ -0,0 +1,4 @@
+/**
+ * This references [noSuchIdentifier].
+ */
+fun f() { }
diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt
index 47fe9c4e..dfecb4d4 100644
--- a/test/src/format/HtmlFormatTest.kt
+++ b/test/src/format/HtmlFormatTest.kt
@@ -33,4 +33,10 @@ public class HtmlFormatTest {
htmlService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ Test fun brokenLink() {
+ verifyOutput("test/data/format/brokenLink.kt", ".html") { model, output ->
+ htmlService.appendNodes(tempLocation, output, model.members.single().members)
+ }
+ }
}