aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src/test
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-08-28 13:15:46 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-28 15:17:58 +0200
commit56199ef712c442a960e11ec9a7bff6de4bc4a532 (patch)
tree7de34062d80eef340acb1d755edbebf25967dd44 /plugins/javadoc/src/test
parent1cefaa46345cd13a36e12060118b1ab5f2936502 (diff)
downloaddokka-56199ef712c442a960e11ec9a7bff6de4bc4a532.tar.gz
dokka-56199ef712c442a960e11ec9a7bff6de4bc4a532.tar.bz2
dokka-56199ef712c442a960e11ec9a7bff6de4bc4a532.zip
Missing javadoc resources on windows
Diffstat (limited to 'plugins/javadoc/src/test')
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt
new file mode 100644
index 00000000..ce14d675
--- /dev/null
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt
@@ -0,0 +1,38 @@
+package org.jetbrains.dokka.javadoc
+
+import org.jetbrains.dokka.javadoc.pages.JavadocClasslikePageNode
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+
+internal class JavadocLocationTemplateMapTest : AbstractJavadocTemplateMapTest() {
+ @Test
+ fun `should have correct location to root from class`(){
+ dualTestTemplateMapInline(
+ kotlin =
+ """
+ /src/source0.kt
+ package com.test.package0
+ /**
+ * Documentation for TestClass
+ */
+ class TestClass
+ """,
+ java =
+ """
+ /src/com/test/package0/TestClass.java
+ package com.test.package0;
+ /**
+ * Documentation for TestClass
+ */
+ public final class TestClass {}
+ """
+ ) {
+ val map = singlePageOfType<JavadocClasslikePageNode>().templateMap
+ assertEquals("TestClass", map["name"])
+ assertEquals("TestClass", map["title"])
+ //This is taken from the expected location of files based on the package, so:
+ //com -> test -> package0
+ assertEquals("../../../", map["pathToRoot"])
+ }
+ }
+} \ No newline at end of file