adds nice git interface
This commit is contained in:
@@ -14,19 +14,4 @@ import Testing
|
||||
repo = nil
|
||||
#expect(!FileManager.default.fileExists(atPath: root.path))
|
||||
}
|
||||
|
||||
@Test func gitServiceStagesAndCommits() async throws {
|
||||
let repo = try TempGitRepo()
|
||||
try repo.commit(["a.txt": "one\n"])
|
||||
try repo.write("a.txt", "two\n")
|
||||
let service = GitService(root: repo.root)
|
||||
#expect(await service.isRepository())
|
||||
try await service.stage(["a.txt"])
|
||||
#expect(try repo.run("status", "--porcelain") == "M a.txt\n")
|
||||
try await service.unstage(["a.txt"])
|
||||
#expect(try repo.run("status", "--porcelain") == " M a.txt\n")
|
||||
try await service.stage(["a.txt"])
|
||||
try await service.commit(message: "second")
|
||||
#expect(try repo.run("log", "--format=%s") == "second\ncommit\n")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user