浏览代码

Merge "Add one more test to ReadTreeTest"

tags/v0.9.1
Chris Aniszczyk 13 年前
父节点
当前提交
77f79659f5
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14
    0
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReadTreeTest.java

+ 14
- 0
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReadTreeTest.java 查看文件

@@ -657,6 +657,20 @@ public abstract class ReadTreeTest extends RepositoryTestCase {
assertTrue(new File(trash, "foo").isFile());
}

public void testDontOverwriteDirtyFile() throws IOException {
setupCase(mk("foo"), mk("other"), mk("foo"));
writeTrashFile("foo", "different");
try {
checkout();
fail("Didn't got the expected conflict");
} catch (CheckoutConflictException e) {
assertIndex(mk("foo"));
assertWorkDir(mkmap("foo", "different"));
assertTrue(getConflicts().equals(Arrays.asList("foo")));
assertTrue(new File(trash, "foo").isFile());
}
}

/**
* The interface these tests need from a class implementing a checkout
*/

正在加载...
取消
保存