Skip to content

Commit

Permalink
Remove repeating hyphens when comparing representation test data
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelenskiy committed Feb 20, 2025
1 parent e32d417 commit e41364f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ private val String.filtered: String get() {
filtered = filtered.replace(INNER_CLASS_INDEX_REGEX, "")
// Remove trailing spaces
filtered = filtered.replace(TRAILING_STACKTRACE_SPACES, " |")
// Remove repeating hyphens
filtered = filtered.replace(REPEATING_HYPHENS, " - ")
return filtered
}

Expand All @@ -85,6 +87,7 @@ private val TEST_EXECUTION_TRACE_ELEMENT_REGEX = listOf(
private val LINE_NUMBER_REGEX = Regex(":(\\d+)")
private val INNER_CLASS_INDEX_REGEX = Regex("#(\\d+)")
private val TRAILING_STACKTRACE_SPACES = Regex(" +\\|")
private val REPEATING_HYPHENS = Regex(" -+ ")

internal fun getExpectedLogFromResources(testFileName: String) =
getExpectedLogFileFromResources(testFileName).readText()
Expand Down

0 comments on commit e41364f

Please sign in to comment.