aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
index 94fdc69e80..84b10f3c53 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
@@ -522,6 +522,14 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals(2, count(it));
}
+ public void testShorteningNoteRefName() throws Exception {
+ String expectedShortName = "review";
+ String noteRefName = Constants.R_NOTES + expectedShortName;
+ assertEquals(expectedShortName, NoteMap.shortenRefName(noteRefName));
+ String nonNoteRefName = Constants.R_HEADS + expectedShortName;
+ assertEquals(nonNoteRefName, NoteMap.shortenRefName(expectedShortName));
+ }
+
private RevCommit commitNoteMap(NoteMap map) throws IOException {
tr.tick(600);