From 822653f017fa58352148e1c586690debb6773965 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 29 Jul 2020 11:29:33 +0200 Subject: Adapt integration tests for checking unresolved links --- .../kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'integration-tests/src/main') 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 d21106fa..c2f4f49b 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 @@ -33,9 +33,18 @@ abstract class AbstractIntegrationTest { ) } - protected fun assertNoUnresolvedLinks(file: File) { + protected fun assertNoEmptyLinks(file: File) { val regex = Regex("[\"']#[\"']") val fileText = file.readText() + assertFalse( + fileText.contains(regex), + "Unexpected empty link in ${file.path}\n" + fileText + ) + } + + protected fun assertNoUnresolvedLinks(file: File) { + val regex = Regex("data-unresolved-link") + val fileText = file.readText() assertFalse( fileText.contains(regex), "Unexpected unresolved link in ${file.path}\n" + fileText -- cgit