Probably redundant tests, but why not
This commit is contained in:
@@ -653,6 +653,12 @@ class PathTests: XCTestCase {
|
||||
XCTAssertEqual(bar.type, .symlink)
|
||||
}
|
||||
}
|
||||
|
||||
func testOptionalInitializer() throws {
|
||||
XCTAssertNil(Path(""))
|
||||
XCTAssertNil(Path("./foo"))
|
||||
XCTAssertEqual(Path("/foo"), Path.root.foo)
|
||||
}
|
||||
}
|
||||
|
||||
private func XCTAssertEqual<P: Pathish, Q: Pathish>(_ p: P, _ q: Q, file: StaticString = #file, line: UInt = #line) {
|
||||
|
||||
@@ -46,6 +46,7 @@ extension PathTests {
|
||||
("testMoveInto", testMoveInto),
|
||||
("testMoveTo", testMoveTo),
|
||||
("testNoUndesiredSymlinkResolution", testNoUndesiredSymlinkResolution),
|
||||
("testOptionalInitializer", testOptionalInitializer),
|
||||
("testPathComponents", testPathComponents),
|
||||
("testReadlinkOnFileReturnsSelf", testReadlinkOnFileReturnsSelf),
|
||||
("testReadlinkOnNonExistantFileThrows", testReadlinkOnNonExistantFileThrows),
|
||||
|
||||
Reference in New Issue
Block a user