Skip to content

Commit ec1dbd1

Browse files
authored
Merge pull request #21246 from JuliaLang/ksh/rmtctor
Add a test for GitRemote ctor with refspec
2 parents 3d07d64 + 769b9d7 commit ec1dbd1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/libgit2.jl

+5
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ mktempdir() do dir
221221
remote = LibGit2.get(LibGit2.GitRemote, repo, branch)
222222
@test LibGit2.push_refspecs(remote) == String["refs/heads/master"]
223223
close(remote)
224+
# constructor with a refspec
225+
remote = LibGit2.GitRemote(repo, "upstream2", repo_url, "upstream")
226+
@test sprint(show, remote) == "GitRemote:\nRemote name: upstream2 url: $repo_url"
227+
@test LibGit2.fetch_refspecs(remote) == String["upstream"]
228+
close(remote)
224229

225230
remote = LibGit2.GitRemoteAnon(repo, repo_url)
226231
@test LibGit2.url(remote) == repo_url

0 commit comments

Comments
 (0)