File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( )
You can’t perform that action at this time.
0 commit comments