diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-22 11:30:57 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-22 11:30:57 +0100 |
commit | 599f32d9bf64fc81dc60e54d5dc5f639086df786 (patch) | |
tree | 69ade26243e9ddecbeaa64af2a8e3f4c6060a52d /test/src/TestAPI.kt | |
parent | db6f8c09977be52109fc65f810ad030fe13bc3e1 (diff) | |
download | dokka-599f32d9bf64fc81dc60e54d5dc5f639086df786.tar.gz dokka-599f32d9bf64fc81dc60e54d5dc5f639086df786.tar.bz2 dokka-599f32d9bf64fc81dc60e54d5dc5f639086df786.zip |
fix comment test on Windows agents
Diffstat (limited to 'test/src/TestAPI.kt')
-rw-r--r-- | test/src/TestAPI.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index efebfeca..2cdaad5d 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -53,11 +53,15 @@ public fun verifyOutput(path: String, outputExtension: String, outputGenerator: verifyModel(path) { val output = StringBuilder() outputGenerator(it, output) - val expectedOutput = File(path.replace(".kt", outputExtension)).readText().replace("\r\n", "\n") - Assert.assertEquals(expectedOutput, output.toString().replace("\r\n", "\n")) + val expectedOutput = File(path.replace(".kt", outputExtension)).readText() + assertEqualsIgnoringSeparators(expectedOutput, output.toString()) } } +public fun assertEqualsIgnoringSeparators(expectedOutput: String, output: String) { + Assert.assertEquals(expectedOutput.replace("\r\n", "\n"), output.replace("\r\n", "\n")) +} + fun StringBuilder.appendChildren(node: ContentNode): StringBuilder { for (child in node.children) { val childText = child.toTestString() |