From 57b9432fb971926c9a6a904f932d69c7fa022ef3 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Mon, 13 Jul 2020 13:44:05 +0200 Subject: BasicGradleIntegrationTest: Cover dokkaSourceSet configureEach --- integration-tests/gradle/projects/it-basic/build.gradle.kts | 9 +++++++++ .../org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'integration-tests') diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts index e5a44555..1de92418 100644 --- a/integration-tests/gradle/projects/it-basic/build.gradle.kts +++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.dokka.gradle.DokkaTask + plugins { kotlin("jvm") id("org.jetbrains.dokka") @@ -9,3 +11,10 @@ dependencies { implementation(kotlin("stdlib")) } +tasks.withType { + dokkaSourceSets { + configureEach { + moduleDisplayName = "Basic Project" + } + } +} diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt index 9ea47d96..5e23a753 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt @@ -57,7 +57,7 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac val navigationHtml = File(this, "navigation.html") assertTrue(navigationHtml.isFile, "Missing navigation.html") - val moduleOutputDir = File(this, "it-basic") + val moduleOutputDir = File(this, "-basic -project") assertTrue(moduleOutputDir.isDirectory, "Missing module directory") val moduleIndexHtml = File(moduleOutputDir, "index.html") @@ -77,6 +77,11 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac assertNoUnresolvedLInks(file) assertNoHrefToMissingLocalFileOrDirectory(file) } + + assertTrue( + allHtmlFiles().any { file -> "Basic Project" in file.readText() }, + "Expected configured moduleDisplayName to be present in html" + ) } private fun File.assertJavadocOutputDir() { -- cgit