diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-11-12 17:25:55 +0100 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-12-01 08:34:26 +0100 |
commit | e4aa7f58fefc7455b5527d410ad3f9c2c4032820 (patch) | |
tree | 065abb5c672f9bf78bb9eefa905b3456863de893 /tests-clar/refs/read.c | |
parent | 80d9d1df14b1f160848ee76dc35f1b0cecab332d (diff) | |
download | libgit2-e4aa7f58fefc7455b5527d410ad3f9c2c4032820.tar.gz |
refs: cover git_reference_name_to_oid() unfound behavior
Diffstat (limited to 'tests-clar/refs/read.c')
-rw-r--r-- | tests-clar/refs/read.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests-clar/refs/read.c b/tests-clar/refs/read.c index aa7f01d57..3e2a59afd 100644 --- a/tests-clar/refs/read.c +++ b/tests-clar/refs/read.c @@ -223,6 +223,7 @@ void test_refs_read__trailing(void) void test_refs_read__unfound_return_ENOTFOUND(void) { git_reference *reference; + git_oid id; cl_assert_equal_i(GIT_ENOTFOUND, git_reference_lookup(&reference, g_repo, "TEST_MASTER")); @@ -232,6 +233,9 @@ void test_refs_read__unfound_return_ENOTFOUND(void) git_reference_lookup(&reference, g_repo, "refs/tags/test/master")); cl_assert_equal_i(GIT_ENOTFOUND, git_reference_lookup(&reference, g_repo, "refs/tags/test/farther/master")); + + cl_assert_equal_i(GIT_ENOTFOUND, + git_reference_name_to_id(&id, g_repo, "refs/tags/test/farther/master")); } static void assert_is_branch(const char *name, bool expected_branchness) |