Commit 09c15a7f by Patrick Steinhardt

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.
parent 880dfc50
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment