summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hattendorf <ianh@axosoft.com>2019-07-25 13:15:10 -0700
committerIan Hattendorf <ianh@axosoft.com>2019-07-25 13:15:20 -0700
commit42ea2f958af25c7bd8fa26c392632b04391f4d86 (patch)
treed1cd37b161ba3b70fcc9368c72295406af21902c
parentba2885da4e5c499850a5fe0dba824dc20550ba4b (diff)
downloadlibgit2-42ea2f958af25c7bd8fa26c392632b04391f4d86.tar.gz
clone: whitespace in url ssh test
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/online/clone.c18
2 files changed, 18 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a97e8fe21..c7fe8e102 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -69,5 +69,5 @@ ADD_CLAR_TEST(offline -v -xonline)
ADD_CLAR_TEST(invasive -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root)
ADD_CLAR_TEST(online -v -sonline)
ADD_CLAR_TEST(gitdaemon -v -sonline::push)
-ADD_CLAR_TEST(ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
+ADD_CLAR_TEST(ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh)
ADD_CLAR_TEST(proxy -v -sonline::clone::proxy)
diff --git a/tests/online/clone.c b/tests/online/clone.c
index e0f422a52..b2f98407d 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -864,7 +864,23 @@ void test_online_clone__proxy_cred_callback_after_failed_url_creds(void)
git_buf_dispose(&url);
}
-void test_online_clone__url_whitespace(void)
+void test_online_clone__path_whitespace(void)
{
cl_git_pass(git_clone(&g_repo, "https://dev.azure.com/ianhattendorf/With%20Space/_git/With%20Space", "./foo", &g_options));
+ cl_assert(git_path_exists("./foo/README.md"));
+}
+
+void test_online_clone__path_whitespace_ssh(void)
+{
+#ifndef GIT_SSH
+ clar__skip();
+#endif
+
+ if (!_remote_ssh_privkey)
+ clar__skip();
+
+ g_options.fetch_opts.callbacks.credentials = cred_cb;
+ g_options.fetch_opts.callbacks.certificate_check = NULL;
+ cl_git_pass(git_clone(&g_repo, "ssh://git@ssh.dev.azure.com/v3/ianhattendorf/With%20Space/With%20Space", "./foo", &g_options));
+ cl_assert(git_path_exists("./foo/README.md"));
}