aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/src/main/kotlin/org/jetbrains/dokka
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-07-29 11:29:33 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commit822653f017fa58352148e1c586690debb6773965 (patch)
tree2ea209645c5bd06d5581493ba68c447eb968d4eb /integration-tests/src/main/kotlin/org/jetbrains/dokka
parentb072356193b98bd34c688c21611180ea68c7f32c (diff)
downloaddokka-822653f017fa58352148e1c586690debb6773965.tar.gz
dokka-822653f017fa58352148e1c586690debb6773965.tar.bz2
dokka-822653f017fa58352148e1c586690debb6773965.zip
Adapt integration tests for checking unresolved links
Diffstat (limited to 'integration-tests/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt11
1 files changed, 10 insertions, 1 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 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,11 +33,20 @@ 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
)
}