Version 0.1.0
This commit is contained in:
@@ -47,22 +47,21 @@ final class GitVersionTests: XCTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func test_commands() throws {
|
func test_commands() throws {
|
||||||
@Dependency(\.shellClient) var shellClient
|
@Dependency(\.shellClient) var shellClient: ShellClient
|
||||||
|
|
||||||
let branch = try shellClient.background(
|
XCTAssertNoThrow(
|
||||||
.gitCurrentBranch(gitDirectory: gitDir),
|
try shellClient.background(
|
||||||
trimmingCharactersIn: .whitespacesAndNewlines
|
.gitCurrentBranch(gitDirectory: gitDir),
|
||||||
|
trimmingCharactersIn: .whitespacesAndNewlines
|
||||||
|
)
|
||||||
)
|
)
|
||||||
print("BRANCH: \(branch)")
|
|
||||||
XCTAssertEqual(branch, "main")
|
|
||||||
|
|
||||||
let commit = try shellClient.background(
|
XCTAssertNoThrow(
|
||||||
.gitCurrentSha(gitDirectory: gitDir),
|
try shellClient.background(
|
||||||
trimmingCharactersIn: .whitespacesAndNewlines
|
.gitCurrentSha(gitDirectory: gitDir),
|
||||||
|
trimmingCharactersIn: .whitespacesAndNewlines
|
||||||
|
)
|
||||||
)
|
)
|
||||||
print("COMMIT: \(commit)")
|
|
||||||
XCTAssertNotEqual(commit, "")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func test_file_client() throws {
|
func test_file_client() throws {
|
||||||
|
|||||||
Reference in New Issue
Block a user