Commit fe215153 by Patrick Steinhardt

tests: apply: fix missing `cl_git_pass` wrappers

Some function calls in the new "apply" test suite were missing the
checks whether they succeeded as expected. Fix this by adding the
missing `cl_git_pass` wrappers.
parent 20cb30b6
......@@ -244,7 +244,7 @@ void test_apply_both__application_failure_leaves_workdir_unmodified(void)
"This is a modification.\n");
cl_git_pass(git_repository_index(&index, repo));
git_index_add_bypath(index, "veal.txt");
cl_git_pass(git_index_add_bypath(index, "veal.txt"));
cl_git_pass(git_index_write(index));
git_index_free(index);
......@@ -291,7 +291,7 @@ void test_apply_both__keeps_nonconflicting_changes(void)
idx_entry.mode = 0100644;
idx_entry.path = "beef.txt";
cl_git_pass(git_oid_fromstr(&idx_entry.id, "898d12687fb35be271c27c795a6b32c8b51da79e"));
git_index_add(index, &idx_entry);
cl_git_pass(git_index_add(index, &idx_entry));
cl_git_pass(git_index_remove(index, "bouilli.txt", 0));
cl_git_pass(git_index_write(index));
......@@ -337,7 +337,7 @@ void test_apply_both__can_apply_nonconflicting_file_changes(void)
"This line is added in the index and the workdir.\n");
cl_git_pass(git_repository_index(&index, repo));
git_index_add_bypath(index, "asparagus.txt");
cl_git_pass(git_index_add_bypath(index, "asparagus.txt"));
cl_git_pass(git_index_write(index));
git_index_free(index);
......
......@@ -167,7 +167,7 @@ void test_apply_workdir__modified_index_with_unmodified_workdir_is_ok(void)
sizeof(struct merge_index_entry);
/* mutate the index and leave the workdir matching HEAD */
git_repository_index(&index, repo);
cl_git_pass(git_repository_index(&index, repo));
idx_entry.mode = 0100644;
idx_entry.path = "veal.txt";
......
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