summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/refs/branches/create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c
index 70ffad88d..c5b45f7e8 100644
--- a/tests/refs/branches/create.c
+++ b/tests/refs/branches/create.c
@@ -277,3 +277,11 @@ void test_refs_branches_create__name_vs_namespace_fail(void)
branch = NULL;
}
}
+
+void test_refs_branches_create__error_when_create_branch_with_invalid_name(void)
+{
+ retrieve_known_commit(&target, repo);
+
+ cl_git_fail(git_branch_create(&branch, repo, "HEAD", target, 0));
+ cl_git_fail(git_branch_create(&branch, repo, "-dash", target, 0));
+}