Skip to content

Commit 57c6d69

Browse files
authored
Merge pull request #2918 from readdle/compatible-valid-path-seps
Fix Darwin Compatibility Tests build
2 parents 66ed508 + 107a7a4 commit 57c6d69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/Foundation/Tests/TestFileManager.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class TestFileManager : XCTestCase {
2525
#endif
2626

2727
func test_NSTemporaryDirectory() {
28+
#if os(Windows)
29+
let validPathSeps: [Character] = ["\\", "/"]
30+
#else
31+
let validPathSeps: [Character] = ["/"]
32+
#endif
33+
2834
let tempDir = NSTemporaryDirectory()
2935
XCTAssertTrue(validPathSeps.contains(where: { tempDir.hasSuffix(String($0)) }), "Temporary directory path must end with path separator")
3036
}

0 commit comments

Comments
 (0)