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
7be5104d
Commit
7be5104d
authored
Oct 31, 2013
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for badly-formed URLs
parent
f93f3790
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
tests-clar/clone/nonetwork.c
+2
-6
tests-clar/network/urlparse.c
+7
-0
No files found.
tests-clar/clone/nonetwork.c
View file @
7be5104d
...
...
@@ -56,13 +56,9 @@ void test_clone_nonetwork__bad_urls(void)
cl_assert
(
!
git_path_exists
(
"./foo"
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"git://example.com:asdf"
,
"./foo"
,
&
g_options
));
cl_assert
(
!
git_path_exists
(
"./foo"
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"git://example.com:asdf/foo"
,
"./foo"
,
&
g_options
));
cl_assert
(
!
git_path_exists
(
"./foo"
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"https://example.com:asdf"
,
"./foo"
,
&
g_options
));
cl_assert
(
!
git_path_exists
(
"./foo"
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"https://example.com:asdf/foo"
,
"./foo"
,
&
g_options
));
cl_assert
(
!
git_path_exists
(
"./foo"
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"git://github.com/git://github.com/foo/bar.git.git"
,
"./bar"
,
&
g_options
));
}
void
test_clone_nonetwork__do_not_clean_existing_directory
(
void
)
...
...
tests-clar/network/urlparse.c
View file @
7be5104d
...
...
@@ -31,6 +31,13 @@ void test_network_urlparse__trivial(void)
cl_assert_equal_p
(
pass
,
NULL
);
}
void
test_network_urlparse__bad_url
(
void
)
{
cl_git_fail_with
(
gitno_extract_url_parts
(
&
host
,
&
port
,
&
user
,
&
pass
,
"github.com/git://github.com/foo/bar.git.git"
,
"443"
),
GIT_EINVALIDSPEC
);
}
void
test_network_urlparse__user
(
void
)
{
cl_git_pass
(
gitno_extract_url_parts
(
&
host
,
&
port
,
&
user
,
&
pass
,
...
...
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