Skip to content

Commit 2ec9e0b

Browse files
author
Andrew McKnight
committed
moving new test method to correct branch
1 parent ccded26 commit 2ec9e0b

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Tests/GitKitTests/GitKitTests.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,25 @@ final class GitKitTests: XCTestCase {
104104
self.assert(type: "output", result: statusOutput, expected: expectation)
105105
}
106106

107+
func testCloneWithDirectory() throws {
108+
let path = self.currentPath()
109+
110+
let expectation = """
111+
On branch main
112+
Your branch is up to date with 'origin/main'.
113+
114+
nothing to commit, working tree clean
115+
"""
116+
117+
try self.clean(path: path)
118+
let git = Git(path: path)
119+
120+
try git.run(.clone(url: "https://github.com/binarybirds/shell-kit.git", dirName: "MyCustomDirectory"))
121+
let statusOutput = try git.run("cd \(path)/MyCustomDirectory && git status")
122+
try self.clean(path: path)
123+
self.assert(type: "output", result: statusOutput, expected: expectation)
124+
}
125+
107126
#if os(macOS)
108127
func testAsyncRun() throws {
109128
let path = self.currentPath()

0 commit comments

Comments
 (0)