Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
f0b350eb
Commit
f0b350eb
authored
May 07, 2012
by
Carlos Martín Nieto
Committed by
nulltoken
May 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: make sure we clean up in objects/blob/write.c
parent
6ca9643c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tests-clar/object/blob/write.c
+5
-4
No files found.
tests-clar/object/blob/write.c
View file @
f0b350eb
...
...
@@ -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
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment