diff options
Diffstat (limited to 'tests/commit/write.c')
-rw-r--r-- | tests/commit/write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/commit/write.c b/tests/commit/write.c index 303d1ce58..96b7cc321 100644 --- a/tests/commit/write.c +++ b/tests/commit/write.c @@ -38,7 +38,7 @@ void test_commit_write__cleanup(void) cl_git_sandbox_cleanup(); - cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 0)); + cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 1)); } @@ -196,10 +196,12 @@ static int create_commit_from_ids( return ret; } -void test_commit_write__doesnt_validate_objects_by_default(void) +void test_commit_write__can_write_invalid_objects(void) { git_oid expected_id, tree_id, parent_id, commit_id; + cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 0)); + /* this is a valid tree and parent */ git_oid_fromstr(&tree_id, tree_id_str); git_oid_fromstr(&parent_id, parent_id_str); @@ -237,8 +239,6 @@ void test_commit_write__can_validate_objects(void) { git_oid tree_id, parent_id, commit_id; - cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 1)); - /* this is a valid tree and parent */ git_oid_fromstr(&tree_id, tree_id_str); git_oid_fromstr(&parent_id, parent_id_str); |