Skip to content

Commit 5e9a1b5

Browse files
authored
Merge pull request #1194 from compnerd/eol
SwiftDriverTests: account for windows line endings
2 parents 7c14673 + f68a777 commit 5e9a1b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/SwiftDriverTests/ParsableMessageTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import TSCBasic
1414

1515
@_spi(Testing) import SwiftDriver
1616
import var Foundation.EXIT_SUCCESS
17+
import class Foundation.NSString
1718

1819
@discardableResult
1920
internal func withHijackedErrorStream(
@@ -26,7 +27,7 @@ internal func withHijackedErrorStream(
2627
TSCBasic.stderrStream = try ThreadSafeOutputByteStream(LocalFileOutputByteStream(file.path))
2728
try body()
2829
TSCBasic.stderrStream.flush()
29-
output = try localFileSystem.readFileContents(file.path).description
30+
output = try "\(localFileSystem.readFileContents(file.path))".replacingOccurrences(of: "\r\n", with: "\n")
3031
}
3132
// Restore the error stream to what it was
3233
TSCBasic.stderrStream = errorStream

0 commit comments

Comments
 (0)