Path(_ url:) -> Path(url:)

This commit is contained in:
Max Howell
2019-02-11 20:40:27 -05:00
parent ed4b773870
commit c9d300a7b6
3 changed files with 16 additions and 7 deletions

View File

@@ -577,10 +577,10 @@ class PathTests: XCTestCase {
}
func testURLInitializer() throws {
XCTAssertEqual(Path(Path.home.url), Path.home)
XCTAssertEqual(Path(url: Path.home.url), Path.home)
XCTAssertEqual(Path.home.fileReferenceURL.flatMap(Path.init), Path.home)
XCTAssertNil(Path(URL(string: "https://foo.com")!))
XCTAssertNil(Path(NSURL(string: "https://foo.com")!))
XCTAssertNil(Path(url: URL(string: "https://foo.com")!))
XCTAssertNil(Path(url: NSURL(string: "https://foo.com")!))
}
func testInitializerForRelativePath() throws {