mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 18:22:16 +00:00
Add unit test for proper init of index entries
This commit is contained in:
parent
86e356ee51
commit
be00b00dd1
@ -87,6 +87,17 @@ void test_object_commit_commitstagedfile__generate_predictable_object_ids(void)
|
|||||||
|
|
||||||
cl_assert(git_oid_cmp(&expected_blob_oid, &entry->oid) == 0);
|
cl_assert(git_oid_cmp(&expected_blob_oid, &entry->oid) == 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Information about index entry should match test file
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
cl_must_pass(p_lstat("treebuilder/test.txt", &st));
|
||||||
|
cl_assert(entry->file_size == st.st_size);
|
||||||
|
cl_assert(entry->uid == st.st_uid);
|
||||||
|
cl_assert(entry->gid == st.st_gid);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Build the tree from the index
|
* Build the tree from the index
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user