aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/src/main/kotlin/org/jetbrains/dokka
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-12-17 12:14:40 +0100
committerGitHub <noreply@github.com>2020-12-17 12:14:40 +0100
commitfea7c42733a339ed19fc7471bb064f53de71cc6b (patch)
treeb3386822c1903026d079b8875bf3508ef20171e4 /integration-tests/src/main/kotlin/org/jetbrains/dokka
parent2f7ee2b82cda39f6bd94c5200b83563418b68dd7 (diff)
downloaddokka-fea7c42733a339ed19fc7471bb064f53de71cc6b.tar.gz
dokka-fea7c42733a339ed19fc7471bb064f53de71cc6b.tar.bz2
dokka-fea7c42733a339ed19fc7471bb064f53de71cc6b.zip
Multimodule tests (#1670)
* Multimodule tests * Multimodule tests
Diffstat (limited to 'integration-tests/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt19
1 files changed, 13 insertions, 6 deletions
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
index 7c08b534..a47adbc4 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
@@ -18,13 +18,12 @@ abstract class AbstractIntegrationTest {
val projectDir get() = File(temporaryTestFolder.root, "project")
- fun File.allDescendentsWithExtension(extension: String): Sequence<File> {
- return this.walkTopDown().filter { it.isFile && it.extension == extension }
- }
+ fun File.allDescendentsWithExtension(extension: String): Sequence<File> =
+ this.walkTopDown().filter { it.isFile && it.extension == extension }
- fun File.allHtmlFiles(): Sequence<File> {
- return allDescendentsWithExtension("html")
- }
+ fun File.allHtmlFiles(): Sequence<File> = allDescendentsWithExtension("html")
+
+ fun File.allGfmFiles(): Sequence<File> = allDescendentsWithExtension("md")
protected fun assertContainsNoErrorClass(file: File) {
val fileText = file.readText()
@@ -103,4 +102,12 @@ abstract class AbstractIntegrationTest {
"Unexpected empty <span></span> in file ${file.path}"
)
}
+
+ protected fun assertNoUnsubstitutedTemplatesInHtml(file: File) {
+ val parsedFile = Jsoup.parse(file, "UTF-8")
+ assertTrue(
+ parsedFile.select("dokka-template-command").isEmpty(),
+ "Expected all templates to be substituted"
+ )
+ }
}