aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java
index 28140f330e..63ec85861d 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java
@@ -113,21 +113,23 @@ public class DirCachePathEditTest {
DirCache dc = DirCache.newInCore();
DirCacheEditor editor = dc.editor();
editor.add(new AddEdit("a/b"));
- editor.add(new AddEdit("a."));
+ editor.add(new AddEdit("a-"));
editor.add(new AddEdit("ab"));
editor.finish();
assertEquals(3, dc.getEntryCount());
+
// Validate sort order
- assertEquals("a.", dc.getEntry(0).getPathString());
+ assertEquals("a-", dc.getEntry(0).getPathString());
assertEquals("a/b", dc.getEntry(1).getPathString());
assertEquals("ab", dc.getEntry(2).getPathString());
editor = dc.editor();
+
// Sort order should not confuse DeleteTree
editor.add(new DirCacheEditor.DeleteTree("a"));
editor.finish();
assertEquals(2, dc.getEntryCount());
- assertEquals("a.", dc.getEntry(0).getPathString());
+ assertEquals("a-", dc.getEntry(0).getPathString());
assertEquals("ab", dc.getEntry(1).getPathString());
}