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:
authorBen Straub <bs@github.com>2013-01-31 06:50:31 +0400
committerBen Straub <bs@github.com>2013-01-31 06:52:47 +0400
commit5f10853e90014ea9929a976f647f2a2d32a2c129 (patch)
tree9e13a60dff6972794b14f03ecda0aa82c6818fc4 /tests-clar/online/clone.c
parent5f9f69d983d7ebc2d9d29cf295e86f32ab12906d (diff)
Skip "user@" when finding hostname in url
Diffstat (limited to 'tests-clar/online/clone.c')
-rw-r--r--tests-clar/online/clone.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/online/clone.c b/tests-clar/online/clone.c
index 8226bd054..12b9e0388 100644
--- a/tests-clar/online/clone.c
+++ b/tests-clar/online/clone.c
@@ -6,6 +6,7 @@
#define LIVE_REPO_URL "http://github.com/libgit2/TestGitRepository"
#define LIVE_EMPTYREPO_URL "http://github.com/libgit2/TestEmptyRepository"
+#define BB_REPO_URL "https://libgit2@bitbucket.org/libgit2/testgitrepository.git"
static git_repository *g_repo;
static git_clone_options g_options;
@@ -150,4 +151,20 @@ void test_online_clone__credentials(void)
g_options.cred_acquire_payload = &user_pass;
cl_git_pass(git_clone(&g_repo, remote_url, "./foo", &g_options));
+ git_repository_free(g_repo); g_repo = NULL;
+ cl_fixture_cleanup("./foo");
+}
+
+void test_online_clone__bitbucket_style(void)
+{
+ git_cred_userpass_payload user_pass = {
+ "libgit2", "libgit2"
+ };
+
+ g_options.cred_acquire_cb = git_cred_userpass;
+ g_options.cred_acquire_payload = &user_pass;
+
+ cl_git_pass(git_clone(&g_repo, BB_REPO_URL, "./foo", &g_options));
+ git_repository_free(g_repo); g_repo = NULL;
+ cl_fixture_cleanup("./foo");
}