[ImportsDumper] Fix path replacements in tests on Windows

This commit is contained in:
Dmitriy Novozhilov
2022-11-24 15:49:23 +02:00
committed by Space Team
parent 6b343515e1
commit 8436328bb5
@@ -70,6 +70,6 @@ class ImportsDumperTest : TestCaseWithTmpdir() {
private fun String.relativizeAbsolutePaths(relativeTo: File): String {
// JSON escapes slashes
val pattern = relativeTo.absoluteFile.toString().replace("/", "\\/")
val pattern = relativeTo.absoluteFile.toString().replace(File.separatorChar.toString(), "\\/")
return this.replace(pattern, "\$TESTDATA_DIR$")
}