We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8948b09 commit 432174bCopy full SHA for 432174b
compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala
@@ -33,11 +33,12 @@ class CoverageTests:
33
checkCoverageIn(rootSrc.resolve("run"), true)
34
35
def checkCoverageIn(dir: Path, run: Boolean)(using TestGroup): Unit =
36
- /** Converts \ to / on windows, to make the tests pass without changing the serialization. */
+ /** Converts \\ (escaped \) to / on windows, to make the tests pass without changing the serialization. */
37
def fixWindowsPaths(lines: Buffer[String]): Buffer[String] =
38
val separator = java.io.File.separatorChar
39
- if separator != '/' then
40
- lines.map(_.replace(separator, '/'))
+ if separator == '\\' then
+ val escapedSep = "\\\\"
41
+ lines.map(_.replace(escapedSep, "/"))
42
else
43
lines
44
end fixWindowsPaths
0 commit comments