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:
Roman Golyshev
2021-06-11 18:05:15 +03:00
committed by TeamCityServer
parent 30f20cb835
commit 3f0cc67f17
@@ -72,7 +72,7 @@ class TestConfigurationBuilder {
private fun String.toMatchingRegexString(): String = when (this) {
"*" -> ".*"
else -> """^.*/${replace("*", ".*")}$"""
else -> """^.*/(${replace("*", ".*")})$"""
}
fun forTestsMatching(pattern: Regex, configuration: TestConfigurationBuilder.() -> Unit) {