diff options
author | Szymon Świstun <sswistun@virtuslab.com> | 2020-02-26 11:33:43 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-27 10:06:41 +0100 |
commit | 971ca471fbca2d382557e8609706eb683a3ada96 (patch) | |
tree | f8aae07bec3c7020f6a6339c16bfc869c9d3f3e1 /plugins/base/src/test/kotlin | |
parent | c5b4475e4adf5f5168b6131df78970dc06d470a2 (diff) | |
download | dokka-971ca471fbca2d382557e8609706eb683a3ada96.tar.gz dokka-971ca471fbca2d382557e8609706eb683a3ada96.tar.bz2 dokka-971ca471fbca2d382557e8609706eb683a3ada96.zip |
response to comments
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r-- | plugins/base/src/test/kotlin/expect/ExpectTest.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/expect/ExpectTest.kt b/plugins/base/src/test/kotlin/expect/ExpectTest.kt index c014c65f..3a85db17 100644 --- a/plugins/base/src/test/kotlin/expect/ExpectTest.kt +++ b/plugins/base/src/test/kotlin/expect/ExpectTest.kt @@ -1,6 +1,5 @@ package expect -import org.jetbrains.dokka.utilities.DokkaConsoleLogger import org.junit.Test import testApi.testRunner.AbstractCoreTest import java.nio.file.Files @@ -34,19 +33,18 @@ class ExpectTest : AbstractCoreTest() { "diff", expected.asString(), path.asString() - ).also { DokkaConsoleLogger.info("git diff command: ${it.command().joinToString(" ")}") } + ).also { logger.info("git diff command: ${it.command().joinToString(" ")}") } .start() assert(gitCompare.waitFor(gitTimeout, TimeUnit.MILLISECONDS)) { "Git timed out after $gitTimeout" } - gitCompare.inputStream.bufferedReader().lines().forEach { DokkaConsoleLogger.info(it) } - gitCompare.errorStream.bufferedReader().lines().forEach { DokkaConsoleLogger.info(it) } + gitCompare.inputStream.bufferedReader().lines().forEach { logger.info(it) } + gitCompare.errorStream.bufferedReader().lines().forEach { logger.info(it) } assert(gitCompare.exitValue() == 0) { "${path.fileName}: outputs don't match" } } ?: throw AssertionError("obtained path is null") } @Test fun expectTest() { - val logger = DokkaConsoleLogger val sources = Paths.get("src/test", "resources", "expect") Files.list(sources).forEach { p -> @@ -55,6 +53,7 @@ class ExpectTest : AbstractCoreTest() { .also { logger.info("Test out: ${it?.asString()}") } compareOutput(expectOut, testOut) + testOut?.toFile()?.deleteRecursively() } } |