diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-07-07 10:36:35 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-07-07 12:15:30 +0200 |
commit | d0a920a6fd70aaad9a3cee10ba6465f3b04a7bc5 (patch) | |
tree | e3ef1cfaa27d5cbeb2c0e45851932cb39be7dc4b /tests-clar/refs/read.c | |
parent | 5ffd510dd2f39f674d502853cee38c80ad959756 (diff) | |
download | libgit2-d0a920a6fd70aaad9a3cee10ba6465f3b04a7bc5.tar.gz |
refs: deep unfound ref returns ENOTFOUND
Diffstat (limited to 'tests-clar/refs/read.c')
-rw-r--r-- | tests-clar/refs/read.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests-clar/refs/read.c b/tests-clar/refs/read.c index d7111b232..6838ead74 100644 --- a/tests-clar/refs/read.c +++ b/tests-clar/refs/read.c @@ -192,3 +192,13 @@ void test_refs_read__loose_first(void) git_reference_free(reference); } + +void test_refs_read__unfound_return_ENOTFOUND(void) +{ + git_reference *reference; + + cl_assert_equal_i(GIT_ENOTFOUND, git_reference_lookup(&reference, g_repo, "test/master")); + cl_assert_equal_i(GIT_ENOTFOUND, git_reference_lookup(&reference, g_repo, "refs/test/master")); + cl_assert_equal_i(GIT_ENOTFOUND, 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")); +} |