Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-11-02 02:29:25 +0400
committerBen Straub <bs@github.com>2013-11-02 02:29:25 +0400
commit7e0359084ef0faba8f458f9cccad2dc8f5baf800 (patch)
tree0f569028ea3c59592c10bee1a77107e86b7a995a /tests-clar
parent567649f2ada60e5c3009cc985af238b452b14a81 (diff)
Streamline url-parsing logic.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/network/urlparse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests-clar/network/urlparse.c b/tests-clar/network/urlparse.c
index 15e841b35..9fc304a07 100644
--- a/tests-clar/network/urlparse.c
+++ b/tests-clar/network/urlparse.c
@@ -38,6 +38,16 @@ void test_network_urlparse__bad_url(void)
GIT_EINVALIDSPEC);
}
+void test_network_urlparse__weird_url(void)
+{
+ cl_git_pass(gitno_extract_url_parts(&host, &port, &user, &pass,
+ "arrbee:my/bad:password@github.com:1111/strange/words.git", "1"));
+ cl_assert_equal_s(host, "github.com");
+ cl_assert_equal_s(port, "1111");
+ cl_assert_equal_s(user, "arrbee");
+ cl_assert_equal_s(pass, "my/bad:password");
+}
+
void test_network_urlparse__user(void)
{
cl_git_pass(gitno_extract_url_parts(&host, &port, &user, &pass,