Skip to content

Commit 1495de1

Browse files
authored
Merge pull request #2685 from compnerd/empty-space
tests: disable a test on Windows
2 parents 7405bd3 + f413444 commit 1495de1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/Foundation/Tests/TestProcess.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,17 @@ class TestProcess : XCTestCase {
647647
}
648648

649649
do {
650+
// NOTE: Windows does have an environment variable called `PWD`.
651+
// The closed thing is %CD% which is a property of the shell rather
652+
// than the environment. Simply ignore this test on Windows.
653+
#if !os(Windows)
650654
XCTAssertNotEqual("/", FileManager.default.currentDirectoryPath)
651655
XCTAssertNotEqual(FileManager.default.currentDirectoryPath, "/")
652656
let (stdout, _) = try runTask([xdgTestHelperURL().path, "--echo-PWD"], currentDirectoryPath: "/")
653657
let directory = stdout.trimmingCharacters(in: CharacterSet(["\n", "\r"]))
654658
XCTAssertEqual(directory, ProcessInfo.processInfo.environment["PWD"])
655659
XCTAssertNotEqual(directory, "/")
660+
#endif
656661
}
657662

658663
do {

0 commit comments

Comments
 (0)