aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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)
+ }
+ }
}