Skip to content

Commit 43a76df

Browse files
committed
Fix windows CI
We need to compare by first stripping the line ends tests\neg\unicodeEscapes.scala failed tests\neg\unicodeEscapes-interpolations.scala failed
1 parent c7e8d26 commit 43a76df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/test/dotty/tools/vulpix/FileDiff.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ object FileDiff {
2121
else Using(Source.fromFile(checkFile, "UTF-8"))(_.getLines().toList).get
2222

2323
// handle check file path mismatch on windows
24-
def lineMatch(out: String, expect: String): Boolean =
25-
out == expect || File.separatorChar == '\\' && out.replace('\\', '/').stripLineEnd == expect
24+
def lineMatch(actual: String, expect: String): Boolean = {
25+
val actual1 = actual.stripLineEnd
26+
val expect1 = expect.stripLineEnd
27+
actual1 == expect1 || File.separatorChar == '\\' && actual1.replace('\\', '/') == expect1
28+
}
2629

2730
def linesMatch =
2831
outputLines.length == checkLines.length &&

0 commit comments

Comments
 (0)