Skip to content

Commit

Permalink
Rework output normalization in build-tools func tests (#61706) (#61721)
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby authored Sep 1, 2020
1 parent e573fa9 commit 41613c1
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ abstract class AbstractGradleFuncTest extends Specification {
}

String normalizedOutput(String input) {
String normalizedPathPrefix = testProjectDir.root.canonicalPath.replace('\\', '/')
return input.readLines()
.collect { it.replaceAll("\\\\", "/") }
.collect {
it.replaceAll(
testProjectDir.root.canonicalPath.replaceAll('\\\\', '/'), ".")
}
.collect { it.replace('\\', '/') }
.collect {it.replace(normalizedPathPrefix , '.') }
.join("\n")
}

Expand Down

0 comments on commit 41613c1

Please sign in to comment.