Skip to content

Commit 3f849d4

Browse files
authored
Merge pull request #23011 from compnerd/file-the-line-with-the-registry
Windows test accomodations
2 parents 2813912 + 14d7218 commit 3f849d4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,10 @@ class _ParentProcess {
928928
let (_, stderrThread) = _stdlib_thread_create_block({
929929
while !self._childStderr.isEOF {
930930
self._childStderr.read()
931-
while let line = self._childStderr.getline() {
931+
while var line = self._childStderr.getline() {
932+
if let cr = line.firstIndex(of: "\r") {
933+
line.remove(at: cr)
934+
}
932935
var done: Bool
933936
(done: done, ()) = onStderrLine(line)
934937
if done { return }

test/stdlib/OptionalTraps.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ OptionalTraps.test("UnwrapNone/location")
3636
{ _isFastAssertConfiguration() },
3737
reason: "this trap is not guaranteed to happen in -Ounchecked"))
3838
.crashOutputMatches(_isDebugAssertConfiguration()
39-
? "test/stdlib/OptionalTraps.swift, line 45"
39+
? "OptionalTraps.swift, line 45"
4040
: "")
4141
.code {
4242
expectCrashLater()

0 commit comments

Comments
 (0)