aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Strapetz2010-08-31 15:54:30 (EDT)
committerMarc Strapetz2010-08-31 15:57:10 (EDT)
commit6a05904e53bb60f96c344db33016b66f170cb9f0 (patch)
tree2f774bbbfbc049bc319290c46c00c61b48f68bdf
parent253b36d27a3d249ec8290b99bf38275d003766e1 (diff)
downloadjgit-6a05904e53bb60f96c344db33016b66f170cb9f0.zip
jgit-6a05904e53bb60f96c344db33016b66f170cb9f0.tar.gz
jgit-6a05904e53bb60f96c344db33016b66f170cb9f0.tar.bz2
Extend DirCache test case to check "intent to add" flag.refs/changes/75/1475/1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3 (renamed from org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3.skipWorkTree)bin741 -> 959 bytes
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java7
2 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3.skipWorkTree b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3
index 4cbd703..4b8dacf 100644
--- a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3.skipWorkTree
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.v3
Binary files differ
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
index f5cdfae..a7e2bc8 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
@@ -183,11 +183,11 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
}
public void testReadWriteV3() throws Exception {
- final File file = pathOf("gitgit.index.v3.skipWorkTree");
+ final File file = pathOf("gitgit.index.v3");
final DirCache dc = new DirCache(file, FS.DETECTED);
dc.read();
- assertEquals(7, dc.getEntryCount());
+ assertEquals(10, dc.getEntryCount());
assertV3TreeEntry(0, "dir1/file1.txt", false, false, dc);
assertV3TreeEntry(1, "dir2/file2.txt", true, false, dc);
assertV3TreeEntry(2, "dir3/file3.txt", false, false, dc);
@@ -195,6 +195,9 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
assertV3TreeEntry(4, "dir4/file4.txt", true, false, dc);
assertV3TreeEntry(5, "dir4/file4a.txt", false, false, dc);
assertV3TreeEntry(6, "file.txt", true, false, dc);
+ assertV3TreeEntry(7, "newdir1/newfile1.txt", false, true, dc);
+ assertV3TreeEntry(8, "newdir1/newfile2.txt", false, true, dc);
+ assertV3TreeEntry(9, "newfile.txt", false, true, dc);
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
dc.writeTo(bos);