File tree 1 file changed +10
-3
lines changed 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,19 @@ class TestURL : XCTestCase {
78
78
XCTAssertEqual ( u6. absoluteString, " file:///S:/b/u6/ " )
79
79
80
80
// ensure that we do not index beyond the start of the string
81
- let u7 = URL ( fileURLWithPath: " eh " , relativeTo: URL ( fileURLWithPath: " S: \\ b " ) )
81
+ // NOTE: explicitly mark `S:\b` as a directory as this test expects the
82
+ // directory to exist to determine that it is a directory.
83
+ let u7 = URL ( fileURLWithPath: " eh " ,
84
+ relativeTo: URL ( fileURLWithPath: " S: \\ b " , isDirectory: true ) )
82
85
XCTAssertEqual ( u7. absoluteString, " file:///S:/b/eh " )
83
86
87
+ let u8 = URL ( fileURLWithPath: " eh " ,
88
+ relativeTo: URL ( fileURLWithPath: " S: \\ b " , isDirectory: false ) )
89
+ XCTAssertEqual ( u8. absoluteString, " file:///S:/eh " )
90
+
84
91
// ensure that / is handled properly
85
- let u8 = URL ( fileURLWithPath: " / " )
86
- XCTAssertEqual ( u8 . absoluteString, " file:/// " )
92
+ let u9 = URL ( fileURLWithPath: " / " )
93
+ XCTAssertEqual ( u9 . absoluteString, " file:/// " )
87
94
}
88
95
89
96
func test_WindowsPathSeparator2( ) {
You can’t perform that action at this time.
0 commit comments