summaryrefslogtreecommitdiff
path: root/tests-clar/refs/read.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-11-12 17:25:55 +0100
committernulltoken <emeric.fermas@gmail.com>2012-12-01 08:34:26 +0100
commite4aa7f58fefc7455b5527d410ad3f9c2c4032820 (patch)
tree065abb5c672f9bf78bb9eefa905b3456863de893 /tests-clar/refs/read.c
parent80d9d1df14b1f160848ee76dc35f1b0cecab332d (diff)
downloadlibgit2-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.c4
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)