aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
index fd3aa2884a..df9ae6a0fb 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
@@ -421,6 +421,23 @@ public class DescribeCommandTest extends RepositoryTestCase {
}
}
+ @Test
+ public void globMatchWithSlashes() throws Exception {
+ ObjectId c1 = modify("aaa");
+ tag("a/b/version");
+ ObjectId c2 = modify("bbb");
+ tag("a/b/version2");
+ if (useAnnotatedTags || describeUseAllTags) {
+ assertEquals("a/b/version", describe(c1, "*/version*"));
+ assertEquals("a/b/version2", describe(c2, "*/version*"));
+ } else {
+ assertNull(describe(c1));
+ assertNull(describe(c1, "*/version*"));
+ assertNull(describe(c2));
+ assertNull(describe(c2, "*/version*"));
+ }
+ }
+
private ObjectId merge(ObjectId c2) throws GitAPIException {
return git.merge().include(c2).call().getNewHead();
}