diff --git a/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift b/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift index 469824ffc1..c7bdb5afb9 100644 --- a/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift @@ -16,7 +16,10 @@ class LogHandleTests: XCTestCase { /// Test that ``LogHandle`` doesn't append extra newlines to output /// - Bug: rdar://73462272 - func testWriteToStandardOutput() { + func testWriteToStandardOutput() throws { +#if os(Windows) + throw XCTSkip("cannot reassign file handles on Windows") +#else let pipe = Pipe() // dup stdout to restore later @@ -50,9 +53,13 @@ class LogHandleTests: XCTestCase { ======================================== """ ) +#endif } - func testFlushesStandardOutput() { + func testFlushesStandardOutput() throws { +#if os(Windows) + throw XCTSkip("cannot reassign file handles on Windows") +#else let pipe = Pipe() // dup stdout to restore later @@ -67,9 +74,13 @@ class LogHandleTests: XCTestCase { let data = pipe.fileHandleForReading.availableData let text = String(data: data, encoding: .utf8) XCTAssertEqual(text, "No newlines here", "\(LogHandle.self) didn't flush stdout") +#endif } - func testFlushesStandardError() { + func testFlushesStandardError() throws { +#if os(Windows) + throw XCTSkip("cannot reassign file handles on Windows") +#else let pipe = Pipe() // dup stdout to restore later @@ -84,5 +95,6 @@ class LogHandleTests: XCTestCase { let data = pipe.fileHandleForReading.availableData let text = String(data: data, encoding: .utf8) XCTAssertEqual(text, "No newlines here", "\(LogHandle.self) didn't flush stderr") +#endif } }