Rework output normalization in build-tools func tests (#61706) (#61721)

This commit is contained in:
Rene Groeschke 2020-09-01 21:00:27 +02:00 committed by GitHub
parent e573fa9abc
commit 41613c16e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -57,12 +57,10 @@ abstract class AbstractGradleFuncTest extends Specification {
} }
String normalizedOutput(String input) { String normalizedOutput(String input) {
String normalizedPathPrefix = testProjectDir.root.canonicalPath.replace('\\', '/')
return input.readLines() return input.readLines()
.collect { it.replaceAll("\\\\", "/") } .collect { it.replace('\\', '/') }
.collect { .collect {it.replace(normalizedPathPrefix , '.') }
it.replaceAll(
testProjectDir.root.canonicalPath.replaceAll('\\\\', '/'), ".")
}
.join("\n") .join("\n")
} }