aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin
diff options
context:
space:
mode:
author2017398956 <2017398956@qq.com>2022-08-11 18:41:02 +0800
committerGitHub <noreply@github.com>2022-08-11 12:41:02 +0200
commita7c3113b2249a0fa1631dbc0e4bb85d75a12b25a (patch)
tree4af69aaaee90fdb69cfc2c0e1a638169870e39a2 /plugins/base/src/test/kotlin
parent732f8aac1eb6b2c137fdf81d9d670a30d0f8b9ea (diff)
downloaddokka-a7c3113b2249a0fa1631dbc0e4bb85d75a12b25a.tar.gz
dokka-a7c3113b2249a0fa1631dbc0e4bb85d75a12b25a.tar.bz2
dokka-a7c3113b2249a0fa1631dbc0e4bb85d75a12b25a.zip
Fixed Java file extension spelling error and add a test (#2604)
Co-authored-by: nfl <fuli.niu@zealcomm.cn>
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r--plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt37
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt b/plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt
new file mode 100644
index 00000000..f618292c
--- /dev/null
+++ b/plugins/base/src/test/kotlin/filter/JavaFileFilterTest.kt
@@ -0,0 +1,37 @@
+package filter
+
+import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
+import org.junit.jupiter.api.Assertions
+import org.junit.jupiter.api.Test
+import kotlin.test.assertEquals
+
+class JavaFileFilterTest : BaseAbstractTest() {
+ @Test
+ fun `java file should be included`() {
+ val configuration = dokkaConfiguration {
+ sourceSets {
+ sourceSet {
+ skipEmptyPackages = false
+ sourceRoots = listOf("src/main/java/basic/Test.java")
+ }
+ }
+ }
+
+ testInline(
+ """
+ |/src/main/java/basic/Test.java
+ |package example;
+ |
+ |
+ |
+ """.trimMargin(),
+ configuration
+ ) {
+ preMergeDocumentablesTransformationStage = {
+ Assertions.assertTrue(
+ it.first().packages.isNotEmpty()
+ )
+ }
+ }
+ }
+}