diff options
Diffstat (limited to 'integration-tests')
3 files changed, 43 insertions, 2 deletions
diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md index 5f22dd72..f8c52880 100644 --- a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md +++ b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md @@ -1,2 +1,2 @@ # Module moduleB -Here is some description +Here is some description for module B diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md index 7e1da8ec..4ead5671 100644 --- a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md +++ b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md @@ -1,2 +1,2 @@ # Module moduleC -Here is some description +Here is some description for module C diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt new file mode 100644 index 00000000..36362552 --- /dev/null +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt @@ -0,0 +1,41 @@ +package org.jetbrains.dokka.it.gradle + +import org.gradle.testkit.runner.TaskOutcome +import org.junit.runners.Parameterized +import java.io.File +import kotlin.test.* + +class MultiModule0IntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() { + companion object { + @get:JvmStatic + @get:Parameterized.Parameters(name = "{0}") + val versions = BuildVersions.permutations( + gradleVersions = listOf("6.5.1", "6.1.1"), + kotlinVersions = listOf("1.4-M2-eap-70") + ) + } + + @BeforeTest + fun prepareProjectFiles() { + val templateProjectDir = File("projects", "it-multimodule-0") + templateProjectDir.listFiles().orEmpty() + .filter { it.isFile } + .forEach { topLevelFile -> topLevelFile.copyTo(File(projectDir, topLevelFile.name)) } + File(templateProjectDir, "moduleA").copyRecursively(File(projectDir, "moduleA")) + } + + @Test + fun execute() { + val result = createGradleRunner("dokkaKdoc", ":moduleA:dokkaKdocMultimodule", "--stacktrace").build() + + assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":moduleA:dokkaKdocMultimodule")).outcome) + + val dokkaOutputDir = File(projectDir, "moduleA/build/dokka/kdocMultimodule") + assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory") + + dokkaOutputDir.allHtmlFiles().forEach { file -> + assertContainsNoErrorClass(file) + assertNoUnresolvedLInks(file) + } + } +} |