mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix GitResetTest
This commit is contained in:
@@ -34,7 +34,7 @@ class GitResetTest : GitSingleRepoTest() {
|
||||
|
||||
assertSuccessfulNotification("Reset successful")
|
||||
assertEquals("Branch is on incorrect point", oldHash.asString(), last())
|
||||
assertEquals("VirtualFile wasn't refreshed", "initial\n", String(vf.contentsToByteArray()))
|
||||
assertEquals("VirtualFile wasn't refreshed", "initial" + System.lineSeparator(), String(vf.contentsToByteArray()))
|
||||
}
|
||||
|
||||
fun `test file status is refreshed on soft reset`() {
|
||||
@@ -49,9 +49,9 @@ class GitResetTest : GitSingleRepoTest() {
|
||||
}
|
||||
|
||||
private fun prepare(): Pair<Hash, VirtualFile> {
|
||||
val file = file("f.txt").create().write("initial\n")
|
||||
val file = file("f.txt").create().write("initial" + System.lineSeparator())
|
||||
val prevHash = HashImpl.build(file.addCommit("created").hash())
|
||||
file.append("more\n")
|
||||
file.append("more" + System.lineSeparator())
|
||||
file.addCommit("Added more")
|
||||
val vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file.file)!!
|
||||
return Pair(prevHash, vf)
|
||||
|
||||
Reference in New Issue
Block a user