Skip to content

Commit 42ea2f9

Browse files
committed
clone: whitespace in url ssh test
1 parent ba2885d commit 42ea2f9

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ ADD_CLAR_TEST(offline -v -xonline)
6969
ADD_CLAR_TEST(invasive -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root)
7070
ADD_CLAR_TEST(online -v -sonline)
7171
ADD_CLAR_TEST(gitdaemon -v -sonline::push)
72-
ADD_CLAR_TEST(ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
72+
ADD_CLAR_TEST(ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh)
7373
ADD_CLAR_TEST(proxy -v -sonline::clone::proxy)

tests/online/clone.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,23 @@ void test_online_clone__proxy_cred_callback_after_failed_url_creds(void)
864864
git_buf_dispose(&url);
865865
}
866866

867-
void test_online_clone__url_whitespace(void)
867+
void test_online_clone__path_whitespace(void)
868868
{
869869
cl_git_pass(git_clone(&g_repo, "https://dev.azure.com/ianhattendorf/With%20Space/_git/With%20Space", "./foo", &g_options));
870+
cl_assert(git_path_exists("./foo/README.md"));
871+
}
872+
873+
void test_online_clone__path_whitespace_ssh(void)
874+
{
875+
#ifndef GIT_SSH
876+
clar__skip();
877+
#endif
878+
879+
if (!_remote_ssh_privkey)
880+
clar__skip();
881+
882+
g_options.fetch_opts.callbacks.credentials = cred_cb;
883+
g_options.fetch_opts.callbacks.certificate_check = NULL;
884+
cl_git_pass(git_clone(&g_repo, "ssh://git@ssh.dev.azure.com/v3/ianhattendorf/With%20Space/With%20Space", "./foo", &g_options));
885+
cl_assert(git_path_exists("./foo/README.md"));
870886
}

0 commit comments

Comments
 (0)