Describe the bug
Stdio output appears to be buffered and not outputting at correct time. The easiest way to reproduce this is create a test which outputs a lot of text. You'll find that the text output appears after the TestSuite passed message. This only happens when running swift from the command line.
Steps To Reproduce
Steps to reproduce the behavior:
- Create package which includes the following test
func testPrint() {
for i in 1..<100 {
let string = (0..<i).map(\.description).joined()
print(string)
}
}
}
- Run
swift test
Expected behavior
Print out of numbers should appear before TestSuite passed message.
Environment (please fill out the following information)
- OS: macOS 12.4
- Xcode: 13.4
- swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
Target: arm64-apple-macosx12.0
Describe the bug
Stdio output appears to be buffered and not outputting at correct time. The easiest way to reproduce this is create a test which outputs a lot of text. You'll find that the text output appears after the
TestSuite passedmessage. This only happens when running swift from the command line.Steps To Reproduce
Steps to reproduce the behavior:
swift testExpected behavior
Print out of numbers should appear before
TestSuite passedmessage.Environment (please fill out the following information)
Target: arm64-apple-macosx12.0