-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Writing Data
to the path/URL "CON" results in a "CON" file being created in the CWD instead of printing that data to stdout
To Reproduce
Given the following unit test in swift-foundation
#if os(Linux) || os(Windows)
@Test
#else
@Test(.disabled("This test is not applicable on this platform"))
#endif
func writeToSpecialFile() throws {
#if os(Windows)
let path = URL(filePath: "CON", directoryHint: .notDirectory)
#else
let path = URL(filePath: "/dev/stdout", directoryHint: .notDirectory)
#endif
#expect(throws: Never.self) {
try Data("Output to STDOUT\n".utf8).write(to: path)
}
}
it creates the file "CON" in the CWD instead of printing "Output to STDOUT" to stdout
Expected behavior
As was the case in previous releases IIRC, I expect this to output to STDOUT and not write to the CWD
Configuration (please complete the following information):
- Swift Version:
main
branch of swift-foundation with the June 22nd Windows main snapshot toolchain - OS: Windows
- OS Version: Windows 10
Regression information:
If applicable, please list older versions where this issue did not occur.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working