diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2013-08-21 13:37:21 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2013-08-27 16:57:17 +0200 |
| commit | ece24ef7c4bb31eb2c715948bcf6dff6ed9d7dfc (patch) | |
| tree | 2508e9de178de9c5886871127666a6340493d997 /tests-clar | |
| parent | 44bc0c6ac3b939d3dfc1102be77e82e00e919ae4 (diff) | |
| download | libgit2-ece24ef7c4bb31eb2c715948bcf6dff6ed9d7dfc.tar.gz | |
remote: Don't parse missing urls as empty strings
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/network/remote/remotes.c | 6 | ||||
| -rw-r--r-- | tests-clar/resources/testrepo.git/config | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tests-clar/network/remote/remotes.c b/tests-clar/network/remote/remotes.c index dec646526..e356526ed 100644 --- a/tests-clar/network/remote/remotes.c +++ b/tests-clar/network/remote/remotes.c @@ -367,8 +367,14 @@ void test_network_remote_remotes__can_load_with_an_empty_url(void) cl_git_pass(git_remote_load(&remote, _repo, "empty-remote-url")); + cl_assert(remote->url == NULL); + cl_assert(remote->pushurl == NULL); + cl_git_fail(git_remote_connect(remote, GIT_DIRECTION_FETCH)); + cl_assert(giterr_last() != NULL); + cl_assert(giterr_last()->klass == GITERR_INVALID); + git_remote_free(remote); } diff --git a/tests-clar/resources/testrepo.git/config b/tests-clar/resources/testrepo.git/config index 904a4e3f3..1264f6ea7 100644 --- a/tests-clar/resources/testrepo.git/config +++ b/tests-clar/resources/testrepo.git/config @@ -10,7 +10,7 @@ url = git://github.com/libgit2/libgit2 [remote "empty-remote-url"] url = - + pushurl = [remote "test_with_pushurl"] url = git://github.com/libgit2/fetchlibgit2 pushurl = git://github.com/libgit2/pushlibgit2 |
