|
|
@ -96,7 +96,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
public void test001_Initalize() { |
|
|
|
public void test001_Initalize() { |
|
|
|
final File gitdir = new File(trash, Constants.DOT_GIT); |
|
|
|
final File gitdir = new File(trash, Constants.DOT_GIT); |
|
|
|
final File hooks = new File(gitdir, "hooks"); |
|
|
|
final File hooks = new File(gitdir, "hooks"); |
|
|
|
final File objects = new File(gitdir, "objects"); |
|
|
|
final File objects = new File(gitdir, Constants.OBJECTS); |
|
|
|
final File objects_pack = new File(objects, "pack"); |
|
|
|
final File objects_pack = new File(objects, "pack"); |
|
|
|
final File objects_info = new File(objects, "info"); |
|
|
|
final File objects_info = new File(objects, "info"); |
|
|
|
final File refs = new File(gitdir, "refs"); |
|
|
|
final File refs = new File(gitdir, "refs"); |
|
|
@ -148,7 +148,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -174,7 +174,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(repo1Parent.getParentFile(), r.getWorkTree()); |
|
|
|
assertEqualsPath(repo1Parent.getParentFile(), r.getWorkTree()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -198,7 +198,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -227,7 +227,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -256,7 +256,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -312,7 +312,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final File o = new File(new File(new File(newdb.getDirectory(), |
|
|
|
final File o = new File(new File(new File(newdb.getDirectory(), |
|
|
|
"objects"), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
Constants.OBJECTS), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
assertTrue("Exists " + o, o.isFile()); |
|
|
|
assertTrue("Exists " + o, o.isFile()); |
|
|
|
assertTrue("Read-only " + o, !o.canWrite()); |
|
|
|
assertTrue("Read-only " + o, !o.canWrite()); |
|
|
|
} |
|
|
|
} |
|
|
@ -324,7 +324,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { |
|
|
|
final ObjectId treeId = insertTree(new TreeFormatter()); |
|
|
|
final ObjectId treeId = insertTree(new TreeFormatter()); |
|
|
|
assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904", treeId.name()); |
|
|
|
assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904", treeId.name()); |
|
|
|
final File o = new File(new File( |
|
|
|
final File o = new File(new File( |
|
|
|
new File(db.getDirectory(), "objects"), "4b"), |
|
|
|
new File(db.getDirectory(), Constants.OBJECTS), "4b"), |
|
|
|
"825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
"825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
assertFalse("Exists " + o, o.isFile()); |
|
|
|
assertFalse("Exists " + o, o.isFile()); |
|
|
|
} |
|
|
|
} |
|
|
|