aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-20 14:08:30 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-20 14:08:30 +0100
commit85a3ae7626810113816fd31a0e26d44d48308ed2 (patch)
tree837eae154a30f139449f560d5e1afebf113041ee /test/src
parentea1f4cc2987536c3ed3df5899e6cec2df890f1e6 (diff)
downloaddokka-85a3ae7626810113816fd31a0e26d44d48308ed2.tar.gz
dokka-85a3ae7626810113816fd31a0e26d44d48308ed2.tar.bz2
dokka-85a3ae7626810113816fd31a0e26d44d48308ed2.zip
support in-page anchors in locations
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TestAPI.kt3
-rw-r--r--test/src/format/HtmlFormatTest.kt6
2 files changed, 8 insertions, 1 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 0b4c2084..285ffa28 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -100,7 +100,8 @@ fun ContentNode.toTestString(): String {
}
class InMemoryLocation(override val path: String): Location {
- override fun relativePathTo(other: Location): String = other.path
+ override fun relativePathTo(other: Location, anchor: String?): String =
+ if (anchor != null) other.path + "#" + anchor else other.path
}
object InMemoryLocationService: LocationService {
diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt
index 6fd7696a..9d4d30da 100644
--- a/test/src/format/HtmlFormatTest.kt
+++ b/test/src/format/HtmlFormatTest.kt
@@ -87,4 +87,10 @@ public class HtmlFormatTest {
htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar"} )
}
}
+
+ Test fun parameterAnchor() {
+ verifyOutput("test/data/format/parameterAnchor.kt", ".html") { model, output ->
+ htmlService.appendNodes(tempLocation, output, model.members.single().members)
+ }
+ }
}