diff options
author | Vicent Martà <vicent@github.com> | 2013-05-06 17:45:53 +0400 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-05-06 17:45:53 +0400 |
commit | 03c28d92d00074f1501cb0d7ce9f5e3e0154a244 (patch) | |
tree | 64c394dc10a839fd0766a800ff31a1d0236360d6 /tests-clar/refs | |
parent | d5e5bbd7193924aa845e107f747a15814a679b10 (diff) | |
parent | 6e286e8dc59874db30b6fbb0ca5d32d4a2b5642c (diff) |
Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
Diffstat (limited to 'tests-clar/refs')
-rw-r--r-- | tests-clar/refs/branches/remote.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-clar/refs/branches/remote.c b/tests-clar/refs/branches/remote.c index 6043828b3..c110adb33 100644 --- a/tests-clar/refs/branches/remote.c +++ b/tests-clar/refs/branches/remote.c @@ -49,16 +49,20 @@ void test_refs_branches_remote__no_matching_remote_returns_error(void) { const char *unknown = "refs/remotes/nonexistent/master"; + giterr_clear(); cl_git_fail_with(git_branch_remote_name( NULL, 0, g_repo, unknown), GIT_ENOTFOUND); + cl_assert(giterr_last() != NULL); } void test_refs_branches_remote__local_remote_returns_error(void) { const char *local = "refs/heads/master"; + giterr_clear(); cl_git_fail_with(git_branch_remote_name( NULL, 0, g_repo, local), GIT_ERROR); + cl_assert(giterr_last() != NULL); } void test_refs_branches_remote__ambiguous_remote_returns_error(void) @@ -75,6 +79,8 @@ void test_refs_branches_remote__ambiguous_remote_returns_error(void) git_remote_free(remote); + giterr_clear(); cl_git_fail_with(git_branch_remote_name(NULL, 0, g_repo, remote_tracking_branch_name), GIT_EAMBIGUOUS); + cl_assert(giterr_last() != NULL); } |