aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-04-29 19:31:57 +0200
committerGitHub <noreply@github.com>2021-04-29 19:31:57 +0200
commit6a6017aec8bb502c674b988acb8b993774dd137a (patch)
treeec70f1977910b45231bd735d0399b0cd66273beb /integration-tests/cli/src/integrationTest/kotlin/org/jetbrains
parent34be1adfc7a5a40cf649b0243eefae8b03af49e1 (diff)
downloaddokka-6a6017aec8bb502c674b988acb8b993774dd137a.tar.gz
dokka-6a6017aec8bb502c674b988acb8b993774dd137a.tar.bz2
dokka-6a6017aec8bb502c674b988acb8b993774dd137a.zip
Make module name optional in cli (#1850)
Diffstat (limited to 'integration-tests/cli/src/integrationTest/kotlin/org/jetbrains')
-rw-r--r--integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt34
1 files changed, 34 insertions, 0 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 8fdcaad5..05ef667a 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
@@ -147,4 +147,38 @@ class CliIntegrationTest : AbstractCliIntegrationTest() {
"Expected to render empty packages"
)
}
+
+ @Test
+ fun `module name should be optional`() {
+ val dokkaOutputDir = File(projectDir, "output")
+ assertTrue(dokkaOutputDir.mkdirs())
+ val process = ProcessBuilder(
+ "java", "-jar", cliJarFile.path,
+ "-outputDir", dokkaOutputDir.path,
+ "-pluginsClasspath", basePluginJarFile.path,
+ "-sourceSet",
+ buildString {
+ append(" -src ${File(projectDir, "src").path}")
+ }
+ )
+ .redirectErrorStream(true)
+ .start()
+
+ val result = process.awaitProcessResult()
+ assertEquals(0, result.exitCode, "Expected exitCode 0 (Success)")
+
+ assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
+
+ val imagesDir = File(dokkaOutputDir, "images")
+ assertTrue(imagesDir.isDirectory, "Missing images directory")
+
+ val scriptsDir = File(dokkaOutputDir, "scripts")
+ assertTrue(scriptsDir.isDirectory, "Missing scripts directory")
+
+ val stylesDir = File(dokkaOutputDir, "styles")
+ assertTrue(stylesDir.isDirectory, "Missing styles directory")
+
+ val navigationHtml = File(dokkaOutputDir, "navigation.html")
+ assertTrue(navigationHtml.isFile, "Missing navigation.html")
+ }
}