8000 Run failing Git test in an isolated repository · yorickpeterse/clogs@a3ae4a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Run failing Git test in an isolated repository
Browse files Browse the repository at this point in the history
Also make it a bit easier to debug in case it fails again in CI.
  • Loading branch information
yorickpeterse committed Nov 9, 2023
1 parent c0cf2de commit a3ae4a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/clogs/test_git.inko
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ fn pub tests(t: mut Tests) {
}

t.test('Repository.run with a valid command') fn (t) {
let repo = Repository.new('.'.to_path)
let out = repo.run('log', ['-1'])
with_repository(t.id) fn (repo, _) {
let out = repo.run('status', [])

t.equal(out.ok.map fn (i) { i.count > 0 }, Option.Some(true))
t.equal(
out.map fn (i) { i.count > 0 }.map_error fn (e) { e.to_string },
Result.Ok(true)
)
}
}

t.test('Repository.run with an invalid command') fn (t) {
Expand Down

0 comments on commit a3ae4a9

Please sign in to comment.
0