Commit 7604ddbf by Sascha Cunz

Tests: Add 3 tags to resources/testrepo.

Adjusts refs::list test (including the comments)
Adjusts objects::tags::list test
parent e800bbe8
......@@ -4,7 +4,7 @@
static git_repository *g_repo;
#define MAX_USED_TAGS 3
#define MAX_USED_TAGS 6
struct pattern_match_t
{
......@@ -47,7 +47,7 @@ static void ensure_tag_pattern_match(git_repository *repo,
}
}
}
cl_assert(sucessfully_found == data->expected_matches);
cl_assert_equal_i((int)sucessfully_found, (int)data->expected_matches);
exit:
git_strarray_free(&tag_list);
......@@ -72,13 +72,13 @@ void test_object_tag_list__list_all(void)
cl_git_pass(git_tag_list(&tag_list, g_repo));
cl_assert(tag_list.count == 3);
cl_assert_equal_i((int)tag_list.count, 6);
git_strarray_free(&tag_list);
}
static const struct pattern_match_t matches[] = {
{ "", 3, { "e90810b", "point_to_blob", "test" } },
{ "", 6, { "e90810b", "point_to_blob", "test", "packed-tag", "foo/bar", "foo/foo/bar" } },
{ "t*", 1, { "test" } },
{ "*b", 2, { "e90810b", "point_to_blob" } },
{ "e", 0 },
......
......@@ -33,10 +33,10 @@ void test_refs_list__all(void)
printf("# %s\n", ref_list.strings[i]);
}*/
/* We have exactly 9 refs in total if we include the packed ones:
/* We have exactly 12 refs in total if we include the packed ones:
* there is a reference that exists both in the packfile and as
* loose, but we only list it once */
cl_assert_equal_i((int)ref_list.count, 10);
cl_assert_equal_i((int)ref_list.count, 13);
git_strarray_free(&ref_list);
}
......@@ -62,7 +62,7 @@ void test_refs_list__do_not_retrieve_references_which_name_end_with_a_lock_exten
"144344043ba4d4a405da03de3844aa829ae8be0e\n");
cl_git_pass(git_reference_list(&ref_list, g_repo, GIT_REF_LISTALL));
cl_assert_equal_i((int)ref_list.count, 10);
cl_assert_equal_i((int)ref_list.count, 13);
git_strarray_free(&ref_list);
}
# pack-refs with: peeled
41bc8c69075bbdb46c5c6f0566cc8cc5b46e8bd9 refs/heads/packed
5b5b025afb0b4c913b4c338a42934a3863bf3644 refs/heads/packed-test
b25fa35b38051e4ae45d4222e795f9df2e43f1d1 refs/tags/packed-tag
b25fa35b38051e4ae45d4222e795f9df2e43f1d1
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