mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Add test case for issue GH-86
This commit is contained in:
committed by
Vicent Marti
parent
bd1aa741a4
commit
1ee32c6dd9
@@ -66,6 +66,10 @@ BEGIN_TEST(read1, "read a tree from the repository")
|
||||
|
||||
must_be_true(git_tree_entrycount(tree) == 3);
|
||||
|
||||
/* GH-86: git_object_lookup() should also check the type if the object comes from the cache */
|
||||
must_be_true(git_object_lookup(&obj, repo, &id, GIT_OBJ_TREE) == 0);
|
||||
must_be_true(git_object_lookup(&obj, repo, &id, GIT_OBJ_BLOB) == GIT_EINVALIDTYPE);
|
||||
|
||||
entry = git_tree_entry_byname(tree, "README");
|
||||
must_be_true(entry != NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user