diff options
author | Matthew Haughton <3flex@users.noreply.github.com> | 2022-05-27 02:45:21 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 19:45:21 +0300 |
commit | 01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385 (patch) | |
tree | e7f63bcde233c54519bb3f84c55541fe5578f114 /integration-tests/cli/src/integrationTest/kotlin/org | |
parent | 4ea32c0af352585ec1886751287cfb56e46a08ea (diff) | |
download | dokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.tar.gz dokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.tar.bz2 dokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.zip |
Fix some integration tests on Windows (#2507)
Diffstat (limited to 'integration-tests/cli/src/integrationTest/kotlin/org')
-rw-r--r-- | integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt b/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt index b94df32a..424c229c 100644 --- a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt +++ b/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt @@ -267,9 +267,10 @@ class CliIntegrationTest : AbstractCliIntegrationTest() { fun `should accept json as input configuration`() { val dokkaOutputDir = File(projectDir, "output") assertTrue(dokkaOutputDir.mkdirs()) - val jsonPath = javaClass.getResource("/my-file.json")?.path ?: throw IllegalStateException("No JSON found!") + val resourcePath = javaClass.getResource("/my-file.json")?.toURI() ?: throw IllegalStateException("No JSON found!") + val jsonPath = File(resourcePath).absolutePath PrintWriter(jsonPath).run { - write(jsonBuilder(dokkaOutputDir.path, basePluginJarFile.path, File(projectDir, "src").path, reportUndocumented = true)) + write(jsonBuilder(dokkaOutputDir.invariantSeparatorsPath, basePluginJarFile.invariantSeparatorsPath, File(projectDir, "src").invariantSeparatorsPath, reportUndocumented = true)) close() } @@ -306,13 +307,14 @@ class CliIntegrationTest : AbstractCliIntegrationTest() { fun `global settings should overwrite package options in configuration`() { val dokkaOutputDir = File(projectDir, "output") assertTrue(dokkaOutputDir.mkdirs()) - val jsonPath = javaClass.getResource("/my-file.json")?.path ?: throw IllegalStateException("No JSON found!") + val resourcePath = javaClass.getResource("/my-file.json")?.toURI() ?: throw IllegalStateException("No JSON found!") + val jsonPath = File(resourcePath).absolutePath PrintWriter(jsonPath).run { write( jsonBuilder( - outputPath = dokkaOutputDir.path, - pluginsClasspath = basePluginJarFile.path, - projectPath = File(projectDir, "src").path, + outputPath = dokkaOutputDir.invariantSeparatorsPath, + pluginsClasspath = basePluginJarFile.invariantSeparatorsPath, + projectPath = File(projectDir, "src").invariantSeparatorsPath, globalSourceLinks = """ { "localDirectory": "/home/Vadim.Mishenev/dokka/examples/cli/src/main/kotlin", |