-
-
Notifications
You must be signed in to change notification settings - Fork 767
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix regression separating classpath entries - #2961 * Use File.pathSeparaterChar to join classpath * Swap separator chars in comment
- Loading branch information
1 parent
2a2e82e
commit b0bd7b9
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...t-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/settings/EnvironmentFacadeSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.gitlab.arturbosch.detekt.core.settings | ||
|
||
import io.gitlab.arturbosch.detekt.core.createNullLoggingSpec | ||
import io.gitlab.arturbosch.detekt.core.createProcessingSettings | ||
import org.assertj.core.api.Assertions.assertThat | ||
import org.spekframework.spek2.Spek | ||
import org.spekframework.spek2.style.specification.describe | ||
|
||
internal class EnvironmentFacadeSpec : Spek({ | ||
|
||
describe("classpath entries can be separated by : or ;") { | ||
|
||
arrayOf( | ||
"supports ;" to "file1;file2;file3", | ||
"supports :" to "file1:file2:file3", | ||
"supports mixing ; and :" to "file1;file2:file3" | ||
).forEach { (testName, classpath) -> | ||
it(testName) { | ||
testSettings(classpath).use { | ||
assertThat(it.classpath).hasSize(3) | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
|
||
private fun testSettings(classpath: String) = createProcessingSettings( | ||
spec = createNullLoggingSpec { | ||
compiler { | ||
this.classpath = classpath | ||
} | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters