Skip to content

Commit 107a7a4

Browse files
committed
Fix Darwin Compatibility Tests build
Broken since #2910. `validPathSeps` is internal to SwiftFoundation and can't be accessed from Compatibility tests. I think it is ok to define expected values in local scope of test.
1 parent 66ed508 commit 107a7a4

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)