aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/model/SourceLinksTest.kt
diff options
context:
space:
mode:
authorKrystianUjma <kujma@virtuslab.com>2019-02-27 17:41:04 +0100
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2019-03-11 19:07:22 +0300
commit7d7e2012e35722c6c0315b2205d708ef5d4341d9 (patch)
treea8121e7fed01268999be8f8bf3091333277e6787 /core/src/test/kotlin/model/SourceLinksTest.kt
parent20bd82d30881f8b8439ea49baab923bc04ff1f2e (diff)
downloaddokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.tar.gz
dokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.tar.bz2
dokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.zip
Fix test, prohibit non-unix path style for dir property
Update readme.md, allow only unix based path (dir property)
Diffstat (limited to 'core/src/test/kotlin/model/SourceLinksTest.kt')
-rw-r--r--core/src/test/kotlin/model/SourceLinksTest.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/src/test/kotlin/model/SourceLinksTest.kt b/core/src/test/kotlin/model/SourceLinksTest.kt
index 1a74506f..0e9b666c 100644
--- a/core/src/test/kotlin/model/SourceLinksTest.kt
+++ b/core/src/test/kotlin/model/SourceLinksTest.kt
@@ -40,7 +40,7 @@ class SourceLinksTest(
private const val sourceLinks = "sourceLinks"
private const val dummy = "dummy.kt"
private const val pathSuffix = "$sourceLinks/$dummy"
- private const val filePath = "$testdata/$pathSuffix/../dummy.kt"
+ private const val filePath = "$testdata/$pathSuffix"
private const val url = "https://example.com"
@Parameterized.Parameters(name = "{index}: {0}, {1}, {2} = {3}")
@@ -59,10 +59,8 @@ class SourceLinksTest(
arrayOf("$testdata/$sourceLinks", "$url/$dummy"),
arrayOf("./$testdata/../$testdata/$sourceLinks", "$url/$dummy")
)
- val allPaths = list +
- // we want to be sure Windows paths work as well
- list.map { arrayOf(it[0].replace('/', '\\'), it[1]) }
- return allPaths.map { arrayOf(it[0].padEnd(maxLength, '_'), url, null, it[1]) } +
+
+ return list.map { arrayOf(it[0].padEnd(maxLength, '_'), url, null, it[1]) } +
listOf(
// check that it also works if url ends with /
arrayOf((File(testdata).absolutePath.removeSuffix("/") + "/").padEnd(maxLength, '_'), "$url/", null, "$url/$pathSuffix"),