diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-10-09 09:08:19 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2017-10-09 09:13:51 +0200 |
commit | 09c15a7fc920f50b23669ededaa7b19fd045e266 (patch) | |
tree | cb6b0089f883ad70d67d6b5c843678cdb5cf3514 | |
parent | 880dfc507ea4d19ff4d30a04b2d94617a91d34d6 (diff) | |
download | libgit2-09c15a7fc920f50b23669ededaa7b19fd045e266.tar.gz |
tests: checkout::tree: check that the status list catches mode changes
While we verify that we have no mode changes after calling
`git_checkout_tree`, we do not verify that the `p_chmod` calls actually
resulted in a changed entry. While we should assume that this works due
to separate tests for the status list, we should test for the change
being listed to avoid programming errors in the test.
-rw-r--r-- | tests/checkout/tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c index d7e756914..56513eab7 100644 --- a/tests/checkout/tree.c +++ b/tests/checkout/tree.c @@ -1541,6 +1541,7 @@ void test_checkout_tree__mode_change_is_force_updated(void) /* update the mode on-disk */ cl_must_pass(p_chmod("testrepo/README", 0755)); + assert_status_entrycount(g_repo, 1); cl_git_pass(git_checkout_tree(g_repo, obj, &g_opts)); assert_status_entrycount(g_repo, 0); @@ -1548,6 +1549,7 @@ void test_checkout_tree__mode_change_is_force_updated(void) cl_must_pass(p_chmod("testrepo/README", 0755)); cl_must_pass(git_index_add_bypath(index, "README")); + assert_status_entrycount(g_repo, 1); cl_git_pass(git_checkout_tree(g_repo, obj, &g_opts)); assert_status_entrycount(g_repo, 0); |