Skip to content

Commit 4ad7651

Browse files
MaxDesiatovaciidgh
authored andcommitted
Add appending function tests to PathTests.swift
1 parent 65d55a9 commit 4ad7651

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

swift-tools-support-core/Tests/TSCBasicTests/PathTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ class PathTests: XCTestCase {
214214
XCTAssertEqual(AbsolutePath("/").appending(components: "..").pathString, "/")
215215
XCTAssertEqual(AbsolutePath("/").appending(components: ".").pathString, "/")
216216
XCTAssertEqual(AbsolutePath("/").appending(components: "..", "a").pathString, "/a")
217+
218+
XCTAssertEqual(RelativePath("hello").appending(components: "a", "b", "c", "..").pathString, "hello/a/b")
219+
XCTAssertEqual(RelativePath("hello").appending(RelativePath("a/b/../c/d")).pathString, "hello/a/c/d")
217220
}
218221

219222
func testPathComponents() {

0 commit comments

Comments
 (0)