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
70c735e1
Commit
70c735e1
authored
Mar 10, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repository_new: test its bareness
parent
770aca94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
tests/repo/new.c
+27
-0
No files found.
tests/repo/new.c
0 → 100644
View file @
70c735e1
#include "clar_libgit2.h"
#include "git2/sys/repository.h"
void
test_repo_new__has_nothing
(
void
)
{
git_repository
*
repo
;
cl_git_pass
(
git_repository_new
(
&
repo
));
cl_assert_equal_b
(
true
,
git_repository_is_bare
(
repo
));
cl_assert_equal_p
(
NULL
,
git_repository_path
(
repo
));
cl_assert_equal_p
(
NULL
,
git_repository_workdir
(
repo
));
git_repository_free
(
repo
);
}
void
test_repo_new__is_bare_until_workdir_set
(
void
)
{
git_repository
*
repo
;
cl_git_pass
(
git_repository_new
(
&
repo
));
cl_assert_equal_b
(
true
,
git_repository_is_bare
(
repo
));
cl_git_pass
(
git_repository_set_workdir
(
repo
,
clar_sandbox_path
(),
0
));
cl_assert_equal_b
(
false
,
git_repository_is_bare
(
repo
));
git_repository_free
(
repo
);
}
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