aboutsummaryrefslogtreecommitdiff
path: root/test/src/TestAPI.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2014-12-30 12:36:14 +0100
committerDmitry Jemerov <yole@jetbrains.com>2014-12-30 12:36:14 +0100
commit8ef68182c02d8ec8fc33d0de0b7fcdef183e7ee7 (patch)
tree72f9e6821593a698c70e8ea6afff173b20338649 /test/src/TestAPI.kt
parent2016ba9a4c6fbd1cc1644eff6d7ac606d624bd23 (diff)
downloaddokka-8ef68182c02d8ec8fc33d0de0b7fcdef183e7ee7.tar.gz
dokka-8ef68182c02d8ec8fc33d0de0b7fcdef183e7ee7.tar.bz2
dokka-8ef68182c02d8ec8fc33d0de0b7fcdef183e7ee7.zip
more correct formatting of Markdown tables
Diffstat (limited to 'test/src/TestAPI.kt')
-rw-r--r--test/src/TestAPI.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 6f4e34c2..cc09f001 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -51,13 +51,12 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) ->
Disposer.dispose(environment)
}
-public fun verifyOutput(path: String, outputGenerator: (DocumentationModule, StringBuilder) -> Unit) {
+public fun verifyOutput(path: String, outputExtension: String, outputGenerator: (DocumentationModule, StringBuilder) -> Unit) {
verifyModel(path) {
val output = StringBuilder()
outputGenerator(it, output)
- val trimmedOutput = output.toString().split('\n').map { it.trimTrailing() }.join("\n")
- val expectedOutput = File(path.replace(".kt", ".md")).readText()
- assertEquals(expectedOutput.trimTrailing(), trimmedOutput)
+ val expectedOutput = File(path.replace(".kt", outputExtension)).readText()
+ assertEquals(expectedOutput, output.toString())
}
}