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
08df6630
Commit
08df6630
authored
Sep 16, 2015
by
Edward Thomson
Committed by
Edward Thomson
Sep 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core::mkdir tests: include absolute mkdirs
parent
ac2fba0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
tests/core/mkdir.c
+35
-0
No files found.
tests/core/mkdir.c
View file @
08df6630
...
...
@@ -13,6 +13,41 @@ static void cleanup_basic_dirs(void *ref)
git_futils_rmdir_r
(
"d4"
,
NULL
,
GIT_RMDIR_EMPTY_HIERARCHY
);
}
void
test_core_mkdir__absolute
(
void
)
{
git_buf
path
=
GIT_BUF_INIT
;
cl_set_cleanup
(
cleanup_basic_dirs
,
NULL
);
git_buf_joinpath
(
&
path
,
clar_sandbox_path
(),
"d0"
);
/* make a directory */
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_git_pass
(
git_futils_mkdir
(
path
.
ptr
,
0755
,
0
));
cl_assert
(
git_path_isdir
(
path
.
ptr
));
git_buf_joinpath
(
&
path
,
path
.
ptr
,
"subdir"
);
/* make a directory */
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_git_pass
(
git_futils_mkdir
(
path
.
ptr
,
0755
,
0
));
cl_assert
(
git_path_isdir
(
path
.
ptr
));
git_buf_joinpath
(
&
path
,
path
.
ptr
,
"another"
);
/* make a directory */
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_git_pass
(
git_futils_mkdir_r
(
path
.
ptr
,
0755
));
cl_assert
(
git_path_isdir
(
path
.
ptr
));
git_buf_joinpath
(
&
path
,
clar_sandbox_path
(),
"d1/foo/bar/asdf"
);
/* make a directory */
cl_assert
(
!
git_path_isdir
(
path
.
ptr
));
cl_git_pass
(
git_futils_mkdir_r
(
path
.
ptr
,
0755
));
cl_assert
(
git_path_isdir
(
path
.
ptr
));
}
void
test_core_mkdir__basic
(
void
)
{
cl_set_cleanup
(
cleanup_basic_dirs
,
NULL
);
...
...
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