File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,19 @@ class TestURL : XCTestCase {
7878 XCTAssertEqual ( u6. absoluteString, " file:///S:/b/u6/ " )
7979
8080 // 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 ) )
8285 XCTAssertEqual ( u7. absoluteString, " file:///S:/b/eh " )
8386
87+ let u8 = URL ( fileURLWithPath: " eh " ,
88+ relativeTo: URL ( fileURLWithPath: " S: \\ b " , isDirectory: false ) )
89+ XCTAssertEqual ( u8. absoluteString, " file:///S:/eh " )
90+
8491 // 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:/// " )
8794 }
8895
8996 func test_WindowsPathSeparator2( ) {
You can’t perform that action at this time.
0 commit comments