Probably redundant tests, but why not
This commit is contained in:
@@ -653,6 +653,12 @@ class PathTests: XCTestCase {
|
|||||||
XCTAssertEqual(bar.type, .symlink)
|
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) {
|
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),
|
("testMoveInto", testMoveInto),
|
||||||
("testMoveTo", testMoveTo),
|
("testMoveTo", testMoveTo),
|
||||||
("testNoUndesiredSymlinkResolution", testNoUndesiredSymlinkResolution),
|
("testNoUndesiredSymlinkResolution", testNoUndesiredSymlinkResolution),
|
||||||
|
("testOptionalInitializer", testOptionalInitializer),
|
||||||
("testPathComponents", testPathComponents),
|
("testPathComponents", testPathComponents),
|
||||||
("testReadlinkOnFileReturnsSelf", testReadlinkOnFileReturnsSelf),
|
("testReadlinkOnFileReturnsSelf", testReadlinkOnFileReturnsSelf),
|
||||||
("testReadlinkOnNonExistantFileThrows", testReadlinkOnNonExistantFileThrows),
|
("testReadlinkOnNonExistantFileThrows", testReadlinkOnNonExistantFileThrows),
|
||||||
|
|||||||
Reference in New Issue
Block a user