1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-08-11 09:40:37 +02:00

Add test that shows an issue when deleting a line at the end of file

This commit is contained in:
Alex Plate 2024-03-12 21:21:15 +02:00
parent 79437df894
commit a9ddfac782
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F

View File

@ -16,6 +16,7 @@ import org.jetbrains.plugins.ideavim.SkipNeovimReason
import org.jetbrains.plugins.ideavim.TestWithoutNeovim
import org.jetbrains.plugins.ideavim.VimTestCase
import org.jetbrains.plugins.ideavim.waitAndAssertMode
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
/**
@ -159,4 +160,25 @@ class DeleteVisualActionTest : VimTestCase() {
""".trimIndent()
doTest(keys, before, after, Mode.NORMAL())
}
// This test causes a bug, but it's minor, and I'm not sure how to fix it properly
// It happens because we do perform sequential deletions on editor that is mutated.
// I think, we should firstly collect operations and then apply them at once. However,
// this will require to much effort at the moment for a tiny bug
@Test
@Disabled
fun `test delete on empty lines`() {
val keys = listOf("Vd")
val before = """
1
${c}
${c}
""".trimIndent()
val after = """
1
${c}
${c}
""".trimIndent()
doTest(keys, before, after, Mode.NORMAL())
}
}