Skip to content

Commit

Permalink
Add a test for aborting a rebase (#21209)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and simonbyrne committed Mar 29, 2017
1 parent 31e2c9a commit 46b6099
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ mktempdir() do dir
LibGit2.add!(repo, "file6")
LibGit2.commit(repo, "add file6")

pre_abort_head = LibGit2.head_oid(repo)
# Rebase type
head_ann = LibGit2.GitAnnotated(repo, "branch/a")
upst_ann = LibGit2.GitAnnotated(repo, "master")
Expand All @@ -879,6 +880,10 @@ mktempdir() do dir
@test rbo_str == "RebaseOperation($(string(rbo.id)))\nOperation type: REBASE_OPERATION_PICK\n"
rb_str = sprint(show, rb)
@test rb_str == "GitRebase:\nNumber: 2\nCurrently performing operation: 1\n"

# test rebase abort
LibGit2.abort(rb)
@test LibGit2.head_oid(repo) == pre_abort_head
finally
close(repo)
end
Expand Down

0 comments on commit 46b6099

Please sign in to comment.