summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorcynecx <me@cynecx.net>2018-02-07 22:30:27 +0100
committercynecx <me@cynecx.net>2018-06-22 13:19:40 +0200
commit630a67366eb475003b46bf56dc06b90197458259 (patch)
treebae222f4a514b067f0c83c81f33bab6b97023029 /tests
parentb121b7ac972156cdc67b25be075fd62450b57f29 (diff)
downloadlibgit2-630a67366eb475003b46bf56dc06b90197458259.tar.gz
refspec: add public parsing api
Fix typo Fix some type issues More fixes Address requested changes Add test Fix naming Fix condition and tests Address requested changes Fix typo
Diffstat (limited to 'tests')
-rw-r--r--tests/network/refspecs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/network/refspecs.c b/tests/network/refspecs.c
index 051802b38..16e585b9a 100644
--- a/tests/network/refspecs.c
+++ b/tests/network/refspecs.c
@@ -158,3 +158,15 @@ void test_network_refspecs__matching(void)
git_refspec__free(&spec);
}
+
+void test_network_refspecs__parse_free(void)
+{
+ git_refspec *spec = NULL;
+
+ cl_git_fail(git_refspec_parse(&spec, "", 0));
+ cl_git_fail(git_refspec_parse(&spec, ":::", 0));
+ cl_git_pass(git_refspec_parse(&spec, "HEAD:", 1));
+
+ cl_assert(spec != NULL);
+ git_refspec_free(spec);
+}