summaryrefslogtreecommitdiffstats
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/ObjectCheckerTest.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
index 531c918e9b..16ad70d383 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
@@ -1678,7 +1678,6 @@ public class ObjectCheckerTest {
rejectName('>');
rejectName(':');
rejectName('"');
- rejectName('/');
rejectName('\\');
rejectName('|');
rejectName('?');
@@ -1693,7 +1692,8 @@ public class ObjectCheckerTest {
checkOneName("te" + c + "st");
fail("incorrectly accepted with " + c);
} catch (CorruptObjectException e) {
- assertEquals("name contains '" + c + "'", e.getMessage());
+
+ assertEquals("char '" + c + "' not allowed in Windows filename", e.getMessage());
}
}
@@ -1703,7 +1703,19 @@ public class ObjectCheckerTest {
checkOneName("te" + ((char) c) + "st");
fail("incorrectly accepted with 0x" + h);
} catch (CorruptObjectException e) {
- assertEquals("name contains byte 0x" + h, e.getMessage());
+ assertEquals("byte 0x" + h + " not allowed in Windows filename", e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void testRejectInvalidCharacter() {
+ try {
+ checkOneName("te/st");
+ fail("incorrectly accepted with /");
+ } catch (CorruptObjectException e) {
+
+ assertEquals("name contains '/'", e.getMessage());
}
}