aboutsummaryrefslogtreecommitdiff
path: root/integration-tests
diff options
context:
space:
mode:
authorMatthew Haughton <3flex@users.noreply.github.com>2022-05-27 02:45:21 +1000
committerGitHub <noreply@github.com>2022-05-26 19:45:21 +0300
commit01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385 (patch)
treee7f63bcde233c54519bb3f84c55541fe5578f114 /integration-tests
parent4ea32c0af352585ec1886751287cfb56e46a08ea (diff)
downloaddokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.tar.gz
dokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.tar.bz2
dokka-01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385.zip
Fix some integration tests on Windows (#2507)
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt14
-rw-r--r--integration-tests/gradle/projects/it-basic/build.gradle.kts2
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt4
3 files changed, 11 insertions, 9 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",
diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts
index 5adefda9..b2a84e5f 100644
--- a/integration-tests/gradle/projects/it-basic/build.gradle.kts
+++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts
@@ -60,5 +60,5 @@ tasks.withType<DokkaTask> {
}
suppressObviousFunctions.set(false)
- pluginsMapConfiguration.set(mapOf(DokkaBase::class.qualifiedName to """{ "customStyleSheets": ["${file("../customResources/logo-styles.css")}", "${file("../customResources/custom-style-to-add.css")}"], "customAssets" : ["${file("../customResources/custom-resource.svg")}"] }"""))
+ pluginsMapConfiguration.set(mapOf(DokkaBase::class.qualifiedName to """{ "customStyleSheets": ["${file("../customResources/logo-styles.css").invariantSeparatorsPath}", "${file("../customResources/custom-style-to-add.css").invariantSeparatorsPath}"], "customAssets" : ["${file("../customResources/custom-resource.svg").invariantSeparatorsPath}"] }"""))
}
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt
index 2bce02aa..539941e0 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt
@@ -29,7 +29,7 @@ abstract class AbstractGradleCachingIntegrationTest(override val versions: Build
buildCache {
local {
// Set local build cache directory.
- directory = File("${projectDir.absolutePath}", "build-cache")
+ directory = File("${projectDir.invariantSeparatorsPath}", "build-cache")
}
}
""".trimIndent()
@@ -40,7 +40,7 @@ abstract class AbstractGradleCachingIntegrationTest(override val versions: Build
buildCache {
local<DirectoryBuildCache> {
// Set local build cache directory.
- directory = File("${projectDir.absolutePath}", "build-cache")
+ directory = File("${projectDir.invariantSeparatorsPath}", "build-cache")
}
}
""".trimIndent()