Skip to content

Commit

Permalink
Added tests for GitReference
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Mar 29, 2016
1 parent 6a1e50a commit a184729
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ mktempdir() do dir
repo = LibGit2.GitRepo(cache_repo)
try
brnch = LibGit2.branch(repo)
brref = LibGit2.head(repo)
@test LibGit2.isbranch(brref)
@test LibGit2.name(brref) == "refs/heads/master"
@test LibGit2.shortname(brref) == "master"
@test LibGit2.ishead(brref)
@test repo.ptr == LibGit2.owner(brref).ptr
@test brnch == "master"

LibGit2.branch!(repo, test_branch, string(commit_oid1), set_head=false)
Expand Down

0 comments on commit a184729

Please sign in to comment.