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
ebb86755
Commit
ebb86755
authored
Oct 15, 2012
by
Philip Kelley
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #985 from nulltoken/fix/leaks
test: fix some memory leaks
parents
71b79a0a
add5efe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
tests-clar/clone/network.c
+9
-0
No files found.
tests-clar/clone/network.c
View file @
ebb86755
...
...
@@ -32,6 +32,8 @@ void test_clone_network__network_full(void)
cl_git_pass
(
git_clone
(
&
g_repo
,
LIVE_REPO_URL
,
"./test2"
,
NULL
,
NULL
,
NULL
));
cl_assert
(
!
git_repository_is_bare
(
g_repo
));
cl_git_pass
(
git_remote_load
(
&
origin
,
g_repo
,
"origin"
));
git_remote_free
(
origin
);
}
...
...
@@ -44,6 +46,8 @@ void test_clone_network__network_bare(void)
cl_git_pass
(
git_clone_bare
(
&
g_repo
,
LIVE_REPO_URL
,
"./test"
,
NULL
));
cl_assert
(
git_repository_is_bare
(
g_repo
));
cl_git_pass
(
git_remote_load
(
&
origin
,
g_repo
,
"origin"
));
git_remote_free
(
origin
);
}
void
test_clone_network__cope_with_already_existing_directory
(
void
)
...
...
@@ -83,6 +87,8 @@ void test_clone_network__can_prevent_the_checkout_of_a_standard_repo(void)
cl_git_pass
(
git_buf_joinpath
(
&
path
,
git_repository_workdir
(
g_repo
),
"master.txt"
));
cl_assert_equal_i
(
false
,
git_path_isfile
(
git_buf_cstr
(
&
path
)));
git_buf_free
(
&
path
);
}
void
test_clone_network__can_checkout_a_cloned_repo
(
void
)
...
...
@@ -104,4 +110,7 @@ void test_clone_network__can_checkout_a_cloned_repo(void)
cl_git_pass
(
git_reference_lookup
(
&
head
,
g_repo
,
"HEAD"
));
cl_assert_equal_i
(
GIT_REF_SYMBOLIC
,
git_reference_type
(
head
));
cl_assert_equal_s
(
"refs/heads/master"
,
git_reference_target
(
head
));
git_reference_free
(
head
);
git_buf_free
(
&
path
);
}
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