Commit e4aa7f58 by nulltoken

refs: cover git_reference_name_to_oid() unfound behavior

parent 80d9d1df
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment