IR text tests: fix regex detection (like DUMP_EXTERNAL_CLASS)
Before this commit, DUMP_EXTERNAL_CLASS etc. didn't work on Windows
This commit is contained in:
@@ -326,7 +326,7 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() {
|
||||
private val EXTERNAL_FILE_PATTERN = Regex("""// EXTERNAL_FILE""")
|
||||
|
||||
private inline fun <T> String.matchLinesWith(regex: Regex, ifMatched: (MatchResult) -> T): List<T> =
|
||||
split("\n").mapNotNull { regex.matchEntire(it)?.let(ifMatched) }
|
||||
lines().mapNotNull { regex.matchEntire(it)?.let(ifMatched) }
|
||||
|
||||
internal fun parseDumpExternalClasses(text: String) =
|
||||
text.matchLinesWith(DUMP_EXTERNAL_CLASS) { it.groupValues[1] }
|
||||
|
||||
Reference in New Issue
Block a user