diff options
| author | Russell Belfer <rb@github.com> | 2014-03-04 15:34:23 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2014-03-04 15:34:23 -0800 |
| commit | f5753999e4cac020c2dd3a4669fe9ba14df93cb5 (patch) | |
| tree | 13e38551546181a59c0dae367192008c555e1fee /tests/odb/loose.c | |
| parent | 0a62caf4e4927cbf74f40d8a2cb44b84267a30da (diff) | |
| download | libgit2-f5753999e4cac020c2dd3a4669fe9ba14df93cb5.tar.gz | |
Add exists_prefix to ODB backend and ODB API
Diffstat (limited to 'tests/odb/loose.c')
| -rw-r--r-- | tests/odb/loose.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/odb/loose.c b/tests/odb/loose.c index a85f1430d..ef7136e36 100644 --- a/tests/odb/loose.c +++ b/tests/odb/loose.c @@ -76,9 +76,13 @@ void test_odb_loose__exists(void) cl_assert(git_odb_exists(odb, &id)); + cl_assert(git_odb_exists_prefix(&id2, odb, &id, 8)); + cl_assert(git_oid_equal(&id, &id2)); + /* Test for a non-existant object */ cl_git_pass(git_oid_fromstr(&id2, "8b137891791fe96927ad78e64b0aad7bded08baa")); cl_assert(!git_odb_exists(odb, &id2)); + cl_assert_equal_i(GIT_ENOTFOUND, git_odb_exists_prefix(NULL, odb, &id2, 8)); git_odb_free(odb); } |
