remote: Enhance in-memory remote test coverage

This commit is contained in:
nulltoken 2012-12-24 15:27:42 +01:00
parent 7d4b65f608
commit b0aa14aa3c
2 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,7 @@ GIT_EXTERN(int) git_remote_save(const git_remote *remote);
* Get the remote's name * Get the remote's name
* *
* @param remote the remote * @param remote the remote
* @return a pointer to the name * @return a pointer to the name or NULL for in-memory remotes
*/ */
GIT_EXTERN(const char *) git_remote_name(const git_remote *remote); GIT_EXTERN(const char *) git_remote_name(const git_remote *remote);

View File

@ -257,6 +257,8 @@ void test_network_remotes__cannot_save_an_inmemory_remote(void)
cl_git_pass(git_remote_create_inmemory(&remote, _repo, "git://github.com/libgit2/libgit2", NULL)); cl_git_pass(git_remote_create_inmemory(&remote, _repo, "git://github.com/libgit2/libgit2", NULL));
cl_assert_equal_p(NULL, git_remote_name(remote));
cl_git_fail(git_remote_save(remote)); cl_git_fail(git_remote_save(remote));
git_remote_free(remote); git_remote_free(remote);
} }