summaryrefslogtreecommitdiff
path: root/tests-clar/object
diff options
context:
space:
mode:
authorSascha Cunz <Sascha@BabbelBox.org>2012-09-21 01:53:15 +0200
committerSascha Cunz <Sascha@BabbelBox.org>2012-09-23 01:02:07 +0200
commit45949b378b418d133e5bdf58d84114a6c3175461 (patch)
tree9982205d0b5c782ad220fc4470e9141bc5f61a1a /tests-clar/object
parent7604ddbf701b586b6f6160807cf32fca28398df1 (diff)
downloadlibgit2-45949b378b418d133e5bdf58d84114a6c3175461.tar.gz
Tests::object::tag: also test for a 'foo/*/bar'.
Diffstat (limited to 'tests-clar/object')
-rw-r--r--tests-clar/object/tag/list.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests-clar/object/tag/list.c b/tests-clar/object/tag/list.c
index f57a689d5..365733557 100644
--- a/tests-clar/object/tag/list.c
+++ b/tests-clar/object/tag/list.c
@@ -78,12 +78,26 @@ void test_object_tag_list__list_all(void)
}
static const struct pattern_match_t matches[] = {
+ // All tags, including a packed one and two namespaced ones.
{ "", 6, { "e90810b", "point_to_blob", "test", "packed-tag", "foo/bar", "foo/foo/bar" } },
+
+ // beginning with
{ "t*", 1, { "test" } },
+
+ // ending with
{ "*b", 2, { "e90810b", "point_to_blob" } },
+
+ // exact match
{ "e", 0 },
{ "e90810b", 1, { "e90810b" } },
+
+ // either or
{ "e90810[ab]", 1, { "e90810b" } },
+
+ // glob in the middle
+ { "foo/*/bar", 1, { "foo/foo/bar" } },
+
+ // End of list
{ NULL }
};