diff options
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/TestAPI.kt | 3 | ||||
-rw-r--r-- | test/src/format/HtmlFormatTest.kt | 6 |
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) + } + } } |