aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base')
-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()
+ )
+ }
+ }
+ }
+}