aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java
index 9c85fbe1ea..f069b65f66 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java
@@ -329,4 +329,18 @@ public class ValidRefNameTest {
Repository.normalizeBranchName("Bug 1#$ 2345 - Hello World")
.equals("Bug_12345-Hello_World"));
}
+
+ @Test
+ public void testNormalizeAlreadyValidRefName() {
+ assertEquals(true,
+ Repository.normalizeBranchName("refs/heads/m.a.s.t.e.r")
+ .equals("refs/heads/m.a.s.t.e.r"));
+ }
+
+ @Test
+ public void testNormalizeTrimmedUnicodeAlreadyValidRefName() {
+ assertEquals(true,
+ Repository.normalizeBranchName(" \u00e5ngstr\u00f6m\t")
+ .equals("\u00e5ngstr\u00f6m"));
+ }
}