Skip to content

Commit

Permalink
fix: executePgmCallBackTest does not work well in windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
lanarimarco committed Dec 12, 2024
1 parent dcfc655 commit 124ccc7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,15 @@ abstract class AbstractTest {
"Errors don't correspond.\n" +
"Expected:\n${expectedSorted.map { "Line ${it.key}, \"${it.value}\"" }.joinToString(separator = "\n") { it } }\n" +
"Actual:\n${found.map { "Line ${it.key}, \"${it.value}\"" }.joinToString(separator = "\n") { it } }\n",
found == expectedSorted
found.toString().sanitize() == expectedSorted.toString().sanitize()
)
}
}

private fun String.sanitize(): String {
return this.replace(Regex("\\s+"), " ").replace(Regex("[^Print]"), "")
}

private fun Map.Entry<Int, String>.contains(list: Map<Int, String>): Boolean {
list.forEach {
if (this.value.contains(it.value) && this.key == it.key) {
Expand Down

0 comments on commit 124ccc7

Please sign in to comment.