From 303ed1aa16d9f4694eab4ab2e8d6b98d780f6068 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sat, 15 Nov 2008 00:24:57 +0100 Subject: [PATCH] Test the origName part of the key vs the ref itself Signed-off-by: Robin Rosenberg Signed-off-by: Shawn O. Pearce --- .../tst/org/spearce/jgit/lib/RefUpdateTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java index 6e2cfa8e..12f9adae 100644 --- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java +++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java @@ -39,6 +39,8 @@ package org.spearce.jgit.lib; import java.io.File; import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; import org.spearce.jgit.lib.RefUpdate.Result; @@ -127,4 +129,12 @@ public class RefUpdateTest extends RepositoryTestCase { private void assertExists(final boolean expected, final String name) { assertEquals(expected, new File(db.getDirectory(), name).exists()); } + + public void testRefKeySameAsOrigName() { + Map allRefs = db.getAllRefs(); + for (Entry e : allRefs.entrySet()) { + assertEquals(e.getKey(), e.getValue().getOrigName()); + + } + } } -- 2.11.4.GIT