diff options
Diffstat (limited to 'tests/t04-commit.c')
-rw-r--r-- | tests/t04-commit.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/t04-commit.c b/tests/t04-commit.c index 3fb4d370c..d0bb1b583 100644 --- a/tests/t04-commit.c +++ b/tests/t04-commit.c @@ -162,7 +162,7 @@ BEGIN_TEST(parse1, "parse the signature line in a commit") must_be_true(strcmp(_email, person.email) == 0);\ must_be_true(_time == person.when.time);\ must_be_true(_offset == person.when.offset);\ - free(person.name); free(person.email);\ + git__free(person.name); git__free(person.email);\ } #define TEST_SIGNATURE_FAIL(_string, _header) { \ @@ -170,7 +170,7 @@ BEGIN_TEST(parse1, "parse the signature line in a commit") size_t len = strlen(_string);\ git_signature person = {NULL, NULL, {0, 0}}; \ must_fail(git_signature__parse(&person, &ptr, ptr + len, _header, '\n'));\ - free(person.name); free(person.email);\ + git__free(person.name); git__free(person.email);\ } TEST_SIGNATURE_PASS( @@ -690,6 +690,10 @@ BEGIN_TEST(write0, "write a new commit object from memory to disk") must_be_true(strcmp(git_commit_message(commit), COMMIT_MESSAGE) == 0); +#ifndef GIT_WIN32 + must_be_true((loose_object_mode(REPOSITORY_FOLDER, (git_object *)commit) & 0777) == GIT_OBJECT_FILE_MODE); +#endif + must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)commit)); git_commit_close(commit); @@ -759,9 +763,11 @@ BEGIN_TEST(root0, "create a root commit") must_pass(git_reference_set_target(head, head_old)); must_pass(git_reference_delete(branch)); must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)commit)); - free(head_old); + git__free(head_old); git_commit_close(commit); git_repository_free(repo); + + git_reference_free(head); END_TEST BEGIN_SUITE(commit) |