Commit 5c7b77c4 by Scott J. Goldman

Seperate out a new test that verifies packed-refs with no trailing newline

as per @vmg's request
parent cb35094b
......@@ -62,7 +62,6 @@ void test_object_tag_read__parse_without_tagger(void)
git_tag *bad_tag;
git_commit *commit;
git_oid id, id_commit;
git_strarray ref_list;
// TODO: This is a little messy
cl_git_pass(git_repository_open(&bad_tag_repo, cl_fixture("bad_tag.git")));
......@@ -82,9 +81,7 @@ void test_object_tag_read__parse_without_tagger(void)
cl_assert(git_oid_cmp(&id_commit, git_commit_id(commit)) == 0);
cl_git_pass(git_reference_list(&ref_list, bad_tag_repo, GIT_REF_LISTALL));
git_strarray_free(&ref_list);
git_tag_free(bad_tag);
git_commit_free(commit);
git_repository_free(bad_tag_repo);
......
......@@ -34,3 +34,14 @@ void test_refs_listall__from_repository_opened_through_gitdir_path(void)
{
ensure_no_refname_starts_with_a_forward_slash(cl_fixture("testrepo.git"));
}
void test_refs_listall__from_repository_with_no_trailing_newline(void)
{
cl_git_pass(git_repository_open(&repo, cl_fixture("bad_tag.git")));
cl_git_pass(git_reference_list(&ref_list, repo, GIT_REF_LISTALL));
cl_assert(ref_list.count > 0);
git_strarray_free(&ref_list);
git_repository_free(repo);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment