Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java
index 4bad73b5b5..c78544309b 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java
@@ -89,6 +89,31 @@ public class DescribeTest extends CLIRepositoryTestCase {
}
@Test
+ public void testDescribeCommitMatchAbbrev() throws Exception {
+ initialCommitAndTag();
+ secondCommit();
+ assertArrayEquals(new String[] { "v1.0-1-g56f6cebdf3f5", "" },
+ execute("git describe --abbrev 12 --match v1.*"));
+ }
+
+ @Test
+ public void testDescribeCommitMatchAbbrevMin() throws Exception {
+ initialCommitAndTag();
+ secondCommit();
+ assertArrayEquals(new String[] { "v1.0-1-g56f6", "" },
+ execute("git describe --abbrev -5 --match v1.*"));
+ }
+
+ @Test
+ public void testDescribeCommitMatchAbbrevMax() throws Exception {
+ initialCommitAndTag();
+ secondCommit();
+ assertArrayEquals(new String[] {
+ "v1.0-1-g56f6cebdf3f5ceeecd803365abf0996fb1fa006d", "" },
+ execute("git describe --abbrev 50 --match v1.*"));
+ }
+
+ @Test
public void testDescribeCommitMatch2() throws Exception {
initialCommitAndTag();
secondCommit();

Back to the top