Commit 8469219e3792fd19d8f6ca5ca6f978928fcb8dc7

Sascha Cunz 2012-09-22T23:11:26

Tests: Add test for git_tag_list to check for 'git tag -l "*bar"'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/tests-clar/object/tag/list.c b/tests-clar/object/tag/list.c
index a3e0b88..6d5a243 100644
--- a/tests-clar/object/tag/list.c
+++ b/tests-clar/object/tag/list.c
@@ -97,6 +97,11 @@ static const struct pattern_match_t matches[] = {
 	// glob in the middle
 	{ "foo/*/bar", 1, { "foo/foo/bar" } },
 
+	// The matching of '*' is based on plain string matching analog to the regular expression ".*"
+	// => a '/' in the tag name has no special meaning.
+	// Compare to `git tag -l "*bar"`
+	{ "*bar", 2, { "foo/bar", "foo/foo/bar" } },
+
 	// End of list
 	{ NULL }
 };