Fix converting string GLOB to regexp in TestConfigurationBuilder
This is required when `p1|p2|p3|...|pN` concatenation is used (see `or` extension function above `toMatchingRegexString`) This is a follow-up to the 6f4b6c1b5b7bc05557306179e25a79fa234aa77f commit
This commit is contained in:
committed by
TeamCityServer
parent
30f20cb835
commit
3f0cc67f17
+1
-1
@@ -72,7 +72,7 @@ class TestConfigurationBuilder {
|
|||||||
|
|
||||||
private fun String.toMatchingRegexString(): String = when (this) {
|
private fun String.toMatchingRegexString(): String = when (this) {
|
||||||
"*" -> ".*"
|
"*" -> ".*"
|
||||||
else -> """^.*/${replace("*", ".*")}$"""
|
else -> """^.*/(${replace("*", ".*")})$"""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun forTestsMatching(pattern: Regex, configuration: TestConfigurationBuilder.() -> Unit) {
|
fun forTestsMatching(pattern: Regex, configuration: TestConfigurationBuilder.() -> Unit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user