We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9df2963 commit 7669801Copy full SHA for 7669801
Tests/BasicsTests/Environment/EnvironmentTests.swift
@@ -103,11 +103,16 @@ final class EnvironmentTests: XCTestCase {
103
/// Important: This test is inherently race-prone, if it is proven to be
104
/// flaky, it should run in a singled threaded environment/removed entirely.
105
func test_current() throws {
106
- try skipOnWindowsAsTestCurrentlyFails(because: "ProcessInfo.processInfo.environment[\"PATH\"] return nil")
+ #if os(Windows)
107
+ let pathEnvVarName = "Path"
108
+ #else
109
+ let pathEnvVarName = "PATH"
110
+ #endif
111
+
112
113
XCTAssertEqual(
114
Environment.current["PATH"],
- ProcessInfo.processInfo.environment["PATH"]
115
+ ProcessInfo.processInfo.environment[pathEnvVarName]
116
)
117
}
118
0 commit comments