Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-11-14 19:21:47 +0400
committerVicent Martí <vicent@github.com>2013-11-14 19:21:47 +0400
commit7b947bf5cc59eefa83c28eb5f5fd8434207ebb8b (patch)
treee3158d9445263156684b0e78ea991778ec9b92ea /tests-clar
parent98eaf39a87164eeb284df5c0239c3a31dfb538e7 (diff)
parent886cc447389da78885a909a96b43ddbe67c9807f (diff)
Merge pull request #1951 from victorgp/create-remote-plus-fetch
Allowing create remotes with custom fetch spec
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/network/remote/remotes.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests-clar/network/remote/remotes.c b/tests-clar/network/remote/remotes.c
index 7c79b8318..954ded82c 100644
--- a/tests-clar/network/remote/remotes.c
+++ b/tests-clar/network/remote/remotes.c
@@ -450,7 +450,6 @@ void test_network_remote_remotes__cannot_create_a_remote_which_name_conflicts_wi
assert_cannot_create_remote("test", GIT_EEXISTS);
}
-
void test_network_remote_remotes__cannot_create_a_remote_which_name_is_invalid(void)
{
assert_cannot_create_remote("/", GIT_EINVALIDSPEC);
@@ -459,6 +458,17 @@ void test_network_remote_remotes__cannot_create_a_remote_which_name_is_invalid(v
assert_cannot_create_remote("a.lock", GIT_EINVALIDSPEC);
}
+void test_network_remote_remote__git_remote_create_with_fetchspec(void)
+{
+ git_remote *remote;
+ git_strarray array;
+
+ cl_git_pass(git_remote_create_with_fetchspec(&remote, _repo, "test-new", "git://github.com/libgit2/libgit2", "+refs/*:refs/*"));
+ git_remote_get_fetch_refspecs(&array, remote);
+ cl_assert_equal_s("+refs/*:refs/*", array.strings[0]);
+ git_remote_free(remote);
+}
+
static const char *fetch_refspecs[] = {
"+refs/heads/*:refs/remotes/origin/*",
"refs/tags/*:refs/tags/*",