summaryrefslogtreecommitdiff
path: root/tests-clar/object/blob/write.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-05-07 11:48:39 +0200
committernulltoken <emeric.fermas@gmail.com>2012-05-13 11:28:49 +0200
commitf0b350eb52866a88e762760d4d169beb60370fb0 (patch)
tree5a669df2edb69fdfee406af53ebb9ae7214f6410 /tests-clar/object/blob/write.c
parent6ca9643c967cb2de89ba360eb226ec49d27345a4 (diff)
downloadlibgit2-f0b350eb52866a88e762760d4d169beb60370fb0.tar.gz
tests: make sure we clean up in objects/blob/write.c
Diffstat (limited to 'tests-clar/object/blob/write.c')
-rw-r--r--tests-clar/object/blob/write.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests-clar/object/blob/write.c b/tests-clar/object/blob/write.c
index 160379511..722c7b956 100644
--- a/tests-clar/object/blob/write.c
+++ b/tests-clar/object/blob/write.c
@@ -15,6 +15,11 @@ typedef int (*blob_creator_fn)(
git_repository *,
const char *);
+void test_object_blob_write__cleanup(void)
+{
+ cl_git_sandbox_cleanup();
+}
+
static void assert_blob_creation(const char *path_to_file, const char *blob_from_path, blob_creator_fn creator)
{
git_oid oid;
@@ -29,8 +34,6 @@ void test_object_blob_write__can_create_a_blob_in_a_standard_repo_from_a_file_lo
repo = cl_git_sandbox_init(WORKDIR);
assert_blob_creation(WORKDIR "/test.txt", "test.txt", &git_blob_create_fromfile);
-
- cl_git_sandbox_cleanup();
}
void test_object_blob_write__can_create_a_blob_in_a_standard_repo_from_a_absolute_filepath_pointing_outside_of_the_working_directory(void)
@@ -47,7 +50,6 @@ void test_object_blob_write__can_create_a_blob_in_a_standard_repo_from_a_absolut
git_buf_free(&full_path);
cl_must_pass(git_futils_rmdir_r(ELSEWHERE, GIT_DIRREMOVAL_FILES_AND_DIRS));
- cl_git_sandbox_cleanup();
}
void test_object_blob_write__can_create_a_blob_in_a_bare_repo_from_a_absolute_filepath(void)
@@ -64,5 +66,4 @@ void test_object_blob_write__can_create_a_blob_in_a_bare_repo_from_a_absolute_fi
git_buf_free(&full_path);
cl_must_pass(git_futils_rmdir_r(ELSEWHERE, GIT_DIRREMOVAL_FILES_AND_DIRS));
- cl_git_sandbox_cleanup();
}