1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-28 08:34:02 +02:00

Use Lorem Ipsum for tests

This commit is contained in:
Alex Plate 2023-03-20 17:31:18 +02:00
parent ff907893d0
commit 03bd4bbeed
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
83 changed files with 1586 additions and 1579 deletions
CONTRIBUTING.md
src/test/java/org/jetbrains/plugins/ideavim
VimTestCase.kt
action
ChangeActionTest.ktFileGetLocationInfoActionTest.ktMacroActionTest.ktResetModeActionTest.kt
change
copy
motion
scroll
ex/implementation/commands
extension
group/visual
helper
option
propertybased
ui

View File

@ -87,9 +87,16 @@ Here are some guides for testing:
1. Read the javadoc for the `@VimBehaviorDiffers` annotation in the source code. 1. Read the javadoc for the `@VimBehaviorDiffers` annotation in the source code.
2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd", "123 123 123 123", etc. Try to choose an example 2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd", "123 123 123 123", etc. Use a few lines of code or
text that is easy to read and understand what is wrong if the test fails. For example, take a few lines from your the following template:
favorite poem, or use Vladimir Nabokovs “A Discovery" if you don't have one. ```text
Lorem Ipsum
Lorem ipsum dolor sit amet,
consectetur adipiscing elit
Sed in orci mauris.
Cras id tellus in ex imperdiet egestas.
```
3. Don't forget to test your functionality with line start, line end, file start, file end, empty line, multiple 3. Don't forget to test your functionality with line start, line end, file start, file end, empty line, multiple
carets, dollar motion, etc. carets, dollar motion, etc.

View File

@ -274,7 +274,7 @@ abstract class VimTestCase {
protected fun configureByPages(pageCount: Int) { protected fun configureByPages(pageCount: Int) {
val stringBuilder = StringBuilder() val stringBuilder = StringBuilder()
repeat(pageCount * screenHeight) { repeat(pageCount * screenHeight) {
stringBuilder.appendLine("I found it in a legendary land") stringBuilder.appendLine("Lorem ipsum dolor sit amet,")
} }
configureByText(stringBuilder.toString()) configureByText(stringBuilder.toString())
} }

View File

@ -1095,11 +1095,11 @@ and some text after""",
"ld^j", "ld^j",
""" """
lorem ${c}ipsum dolor sit amet lorem ${c}ipsum dolor sit amet
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
psum dolor sit amet psum dolor sit amet
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -1112,11 +1112,11 @@ and some text after""",
"ldbj", "ldbj",
""" """
lorem$c ipsum dolor sit amet lorem$c ipsum dolor sit amet
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
ipsum dolor sit amet ipsum dolor sit amet
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -1129,11 +1129,11 @@ and some text after""",
"lcb<Esc>j", "lcb<Esc>j",
""" """
lorem$c ipsum dolor sit amet lorem$c ipsum dolor sit amet
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
ipsum dolor sit amet ipsum dolor sit amet
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -1146,11 +1146,11 @@ and some text after""",
"lc^<Esc>j", "lc^<Esc>j",
""" """
lorem$c ipsum dolor sit amet lorem$c ipsum dolor sit amet
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
ipsum dolor sit amet ipsum dolor sit amet
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -1162,11 +1162,11 @@ and some text after""",
doTest( doTest(
"ld^k", "ld^k",
""" """
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
lorem ${c}ipsum dolor sit amet lorem ${c}ipsum dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
psum dolor sit amet psum dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
@ -1179,11 +1179,11 @@ and some text after""",
doTest( doTest(
"lcb<Esc>k", "lcb<Esc>k",
""" """
lorem ipsum dolor sit amet Lorem Ipsumm dolor sit amet
lorem$c ipsum dolor sit amet lorem$c ipsum dolor sit amet
""".trimIndent(), """.trimIndent(),
""" """
${c}lorem ipsum dolor sit amet ${c}Lorem Ipsumm dolor sit amet
ipsum dolor sit amet ipsum dolor sit amet
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,

View File

@ -20,16 +20,16 @@ class FileGetLocationInfoActionTest : VimTestCase() {
fun `test get file info`() { fun `test get file info`() {
val keys = injector.parser.parseKeys("g<C-G>") val keys = injector.parser.parseKeys("g<C-G>")
val before = """ val before = """
${c}A Discovery ${c}Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)
kotlin.test.assertEquals("Col 1 of 11; Line 1 of 6; Word 1 of 34; Character 1 of 165", VimPlugin.getMessage()) kotlin.test.assertEquals("Col 1 of 11; Line 1 of 6; Word 1 of 23; Character 1 of 128", VimPlugin.getMessage())
} }
@VimBehaviorDiffers(originalVimAfter = "Col 1 of 11; Line 1 of 7; Word 1 of 32; Byte 1 of 167") @VimBehaviorDiffers(originalVimAfter = "Col 1 of 11; Line 1 of 7; Word 1 of 32; Byte 1 of 167")
@ -37,17 +37,17 @@ class FileGetLocationInfoActionTest : VimTestCase() {
fun `test get file info with empty line`() { fun `test get file info with empty line`() {
val keys = injector.parser.parseKeys("g<C-G>") val keys = injector.parser.parseKeys("g<C-G>")
val before = """ val before = """
${c}A Discovery ${c}Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)
kotlin.test.assertEquals("Col 1 of 11; Line 1 of 7; Word 1 of 35; Character 1 of 166", VimPlugin.getMessage()) kotlin.test.assertEquals("Col 1 of 11; Line 1 of 7; Word 1 of 24; Character 1 of 129", VimPlugin.getMessage())
} }
@VimBehaviorDiffers(originalVimAfter = "Col 1 of 40; Line 4 of 7; Word 12 of 32; Byte 55 of 167") @VimBehaviorDiffers(originalVimAfter = "Col 1 of 40; Line 4 of 7; Word 12 of 32; Byte 55 of 167")
@ -55,17 +55,17 @@ class FileGetLocationInfoActionTest : VimTestCase() {
fun `test get file info in the middle`() { fun `test get file info in the middle`() {
val keys = injector.parser.parseKeys("g<C-G>") val keys = injector.parser.parseKeys("g<C-G>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks ${c}and lavender and tufted grass, all rocks ${c}and lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)
kotlin.test.assertEquals("Col 11 of 40; Line 4 of 7; Word 13 of 35; Character 55 of 166", VimPlugin.getMessage()) kotlin.test.assertEquals("Col 11 of 40; Line 4 of 7; Word 11 of 28; Character 52 of 142", VimPlugin.getMessage())
} }
@VimBehaviorDiffers(originalVimAfter = "Col 1 of 0; Line 7 of 7; Word 32 of 32; Byte 167 of 167") @VimBehaviorDiffers(originalVimAfter = "Col 1 of 0; Line 7 of 7; Word 32 of 32; Byte 167 of 167")
@ -73,16 +73,16 @@ class FileGetLocationInfoActionTest : VimTestCase() {
fun `test get file info on the last line`() { fun `test get file info on the last line`() {
val keys = injector.parser.parseKeys("g<C-G>") val keys = injector.parser.parseKeys("g<C-G>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
$c $c
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)
kotlin.test.assertEquals("Col 1 of 1; Line 7 of 7; Word 35 of 35; Character 167 of 166", VimPlugin.getMessage()) kotlin.test.assertEquals("Col 1 of 1; Line 7 of 7; Word 24 of 24; Character 130 of 129", VimPlugin.getMessage())
} }
} }

View File

@ -56,17 +56,17 @@ class MacroActionTest : VimTestCase() {
@Test @Test
fun `test macro with search`() { fun `test macro with search`() {
val content = """ val content = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(content) configureByText(content)
typeText(injector.parser.parseKeys("qa" + "/rocks<CR>" + "q" + "gg" + "@a")) typeText(injector.parser.parseKeys("qa" + "/consectetur<CR>" + "q" + "gg" + "@a"))
val startOffset = content.rangeOf("rocks").startOffset val startOffset = content.rangeOf("consectetur").startOffset
waitAndAssert { waitAndAssert {
startOffset == fixture.editor.caretModel.offset startOffset == fixture.editor.caretModel.offset
@ -76,12 +76,12 @@ class MacroActionTest : VimTestCase() {
@Test @Test
fun `test macro with command`() { fun `test macro with command`() {
val content = """ val content = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(content) configureByText(content)
typeText(injector.parser.parseKeys("qa" + ":map x y<CR>" + "q")) typeText(injector.parser.parseKeys("qa" + ":map x y<CR>" + "q"))
@ -126,12 +126,12 @@ class MacroActionTest : VimTestCase() {
// Broken, see the resulting text // Broken, see the resulting text
fun `ignore test macro with macro`() { fun `ignore test macro with macro`() {
val content = """ val content = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(content) configureByText(content)
typeText(injector.parser.parseKeys("qa" + "l" + "q" + "qb" + "10@a" + "q" + "2@b")) typeText(injector.parser.parseKeys("qa" + "l" + "q" + "qb" + "10@a" + "q" + "2@b"))
@ -157,24 +157,24 @@ class MacroActionTest : VimTestCase() {
@Test @Test
fun `test stop on error`() { fun `test stop on error`() {
val content = """ val content = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(content) configureByText(content)
typeText(injector.parser.parseKeys("qa" + "i1<esc>j" + "q" + "gg" + "10@a")) typeText(injector.parser.parseKeys("qa" + "i1<esc>j" + "q" + "gg" + "10@a"))
assertState( assertState(
""" """
1A Discovery 1Lorem Ipsum
1 1
11I found it in a legendary land 11Lorem ipsum dolor sit amet,
1all rocks and lavender and tufted grass, 1consectetur adipiscing elit
1where it was settled on some sodden sand 1Sed in orci mauris.
${c}1hard by the torrent of a mountain pass. ${c}1Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -24,8 +24,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from normal mode`() { fun `test reset from normal mode`() {
val keys = "<C-\\><C-N>" val keys = "<C-\\><C-N>"
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "A Discovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -33,8 +33,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from insert mode`() { fun `test reset from insert mode`() {
val keys = listOf("i", "<C-\\><C-N>") val keys = listOf("i", "<C-\\><C-N>")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "A Discovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -51,8 +51,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset and execute command`() { fun `test reset and execute command`() {
val keys = listOf("i", "<C-\\><C-N>", "3l") val keys = listOf("i", "<C-\\><C-N>", "3l")
val before = "${c}A Discovery" val before = "${c}Lorem Ipsum"
val after = "A D${c}iscovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -60,8 +60,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from visual mode`() { fun `test reset from visual mode`() {
val keys = listOf("V", "<C-\\><C-N>") val keys = listOf("V", "<C-\\><C-N>")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "A Discovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -69,8 +69,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from select mode`() { fun `test reset from select mode`() {
val keys = listOf("gH", "<C-\\><C-N>") val keys = listOf("gH", "<C-\\><C-N>")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "A Discovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -78,8 +78,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from operator-pending mode`() { fun `test reset from operator-pending mode`() {
val keys = listOf("d", "<C-\\><C-N>") val keys = listOf("d", "<C-\\><C-N>")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "A Discovery" val after = "Lorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -87,8 +87,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test reset from operator-pending mode with delete`() { fun `test reset from operator-pending mode with delete`() {
val keys = "d<Esc>dw" val keys = "d<Esc>dw"
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Discovery" val after = "Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -96,8 +96,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test delete command after resetting operator-pending mode`() { fun `test delete command after resetting operator-pending mode`() {
val keys = listOf("d", "<C-\\><C-N>", "dw") val keys = listOf("d", "<C-\\><C-N>", "dw")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Discovery" val after = "Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -105,8 +105,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test delete command after resetting operator-pending mode with esc`() { fun `test delete command after resetting operator-pending mode with esc`() {
val keys = listOf("d", "<Esc>", "dw") val keys = listOf("d", "<Esc>", "dw")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Discovery" val after = "Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -115,8 +115,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test delete command after resetting operator-pending mode with ctrl open bracket`() { fun `test delete command after resetting operator-pending mode with ctrl open bracket`() {
val keys = listOf("d", "<C-[>", "dw") val keys = listOf("d", "<C-[>", "dw")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Discovery" val after = "Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -134,8 +134,8 @@ class ResetModeActionTest : VimTestCase() {
) )
val keys = listOf("d", "<C-D>", "dw") val keys = listOf("d", "<C-D>", "dw")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Discovery" val after = "Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }
@ -143,8 +143,8 @@ class ResetModeActionTest : VimTestCase() {
@Test @Test
fun `test non-delete commands after resetting operator-pending mode`() { fun `test non-delete commands after resetting operator-pending mode`() {
val keys = listOf("c", "<C-\\><C-N>", "another") val keys = listOf("c", "<C-\\><C-N>", "another")
val before = "A Discovery" val before = "Lorem Ipsum"
val after = "Another Discovery" val after = "Lnotherorem Ipsum"
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection()) kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
} }

View File

@ -20,20 +20,20 @@ class RepeatChangeActionTest : VimTestCase() {
fun `test simple repeat`() { fun `test simple repeat`() {
val keys = listOf("v2erXj^", ".") val keys = listOf("v2erXj^", ".")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
XXXXXXXXXX in a legendary land XXXXXXXXXXX dolor sit amet,
${c}XXXXXXXXXXand lavender and tufted grass, ${c}XXXXXXXXXXX adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -42,20 +42,20 @@ class RepeatChangeActionTest : VimTestCase() {
fun `test simple repeat with dollar motion`() { fun `test simple repeat with dollar motion`() {
val keys = listOf("v\$rXj^", ".") val keys = listOf("v\$rXj^", ".")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX
${c}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ${c}XXXXXXXXXXXXXXXXXXXXXXXXXXX
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -176,19 +176,19 @@ class RepeatChangeActionTest : VimTestCase() {
fun `test line motion to end`() { fun `test line motion to end`() {
val keys = listOf("VjrX2j^", ".") val keys = listOf("VjrX2j^", ".")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX
where it was settled on some sodden sand Sed in orci mauris.
${c}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ${c}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
@ -199,20 +199,20 @@ class RepeatChangeActionTest : VimTestCase() {
fun `test line motion shift`() { fun `test line motion shift`() {
val keys = listOf("V3j<", ".") val keys = listOf("V3j<", ".")
val before = """ val before = """
|A Discovery |Lorem Ipsum
| |
| ${c}I found it in a legendary land | ${c}Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """ val after = """
|A Discovery |Lorem Ipsum
| |
|${c}I found it in a legendary land |${c}Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -242,7 +242,7 @@ class RepeatChangeActionTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
""" """
A Discovery Lorem Ipsum
XXXXXnd it in a legendary land XXXXXnd it in a legendary land
XXXXXocks and lavender and tufted grass, XXXXXocks and lavender and tufted grass,
@ -302,20 +302,20 @@ class RepeatChangeActionTest : VimTestCase() {
fun `test repeat with count`() { fun `test repeat with count`() {
val keys = listOf("4x", "j", ".") val keys = listOf("4x", "j", ".")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
und it in a legendary land m ipsum dolor sit amet,
${c}rocks and lavender and tufted grass, ${c}ectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }

View File

@ -18,12 +18,12 @@ class UndoActionTest : VimTestCase() {
fun `test simple undo`() { fun `test simple undo`() {
val keys = listOf("dw", "u") val keys = listOf("dw", "u")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = before val after = before
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
@ -35,12 +35,12 @@ class UndoActionTest : VimTestCase() {
fun `undo after selection`() { fun `undo after selection`() {
val keys = listOf("v3eld", "u") val keys = listOf("v3eld", "u")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = before val after = before
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
@ -51,20 +51,20 @@ class UndoActionTest : VimTestCase() {
fun `test undo with count`() { fun `test undo with count`() {
val keys = listOf("dwdwdw", "2u") val keys = listOf("dwdwdw", "2u")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}found it in a legendary land ${c}ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(hasSelection()) kotlin.test.assertFalse(hasSelection())
@ -75,20 +75,20 @@ class UndoActionTest : VimTestCase() {
if (!optionsNoEditor().isSet(IjOptionConstants.oldundo)) { if (!optionsNoEditor().isSet(IjOptionConstants.oldundo)) {
val keys = listOf("a1<Esc>ea2<Esc>ea3<Esc>", "uu") val keys = listOf("a1<Esc>ea2<Esc>ea3<Esc>", "uu")
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I1 found$c it in a legendary land I1 found$c it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
kotlin.test.assertFalse(hasSelection()) kotlin.test.assertFalse(hasSelection())

View File

@ -34,11 +34,11 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"S", "S",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
$c $c
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
@ -51,12 +51,12 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"S", "S",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
$c $c
""".trimIndent(), """.trimIndent(),
@ -70,11 +70,11 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"S", "S",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
$c $c
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
@ -87,12 +87,12 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"S", "S",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
$c $c
""".trimIndent(), """.trimIndent(),
@ -107,11 +107,11 @@ class ChangeLineActionTest : VimTestCase() {
"S", "S",
""" """
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
""" """
$c $c
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -123,12 +123,12 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"cc", "cc",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
$c $c
""".trimIndent(), """.trimIndent(),
@ -142,13 +142,13 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"cc", "cc",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
$c $c
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
$c $c
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
@ -161,10 +161,10 @@ class ChangeLineActionTest : VimTestCase() {
doTest( doTest(
"3S", "3S",
""" """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
The features it combines mark it as new The features it combines mark it as new
to science: shape and shade -- the special tinge, to science: shape and shade -- the special tinge,
@ -178,7 +178,7 @@ class ChangeLineActionTest : VimTestCase() {
""".trimIndent(), """.trimIndent(),
""" """
$c $c
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
The features it combines mark it as new The features it combines mark it as new
to science: shape and shade -- the special tinge, to science: shape and shade -- the special tinge,

View File

@ -21,19 +21,19 @@ class ChangeVisualActionTest : VimTestCase() {
fun `test multiple line change`() { fun `test multiple line change`() {
val keys = "VjcHello<esc>" val keys = "VjcHello<esc>"
val before = """ val before = """
${c}A Discovery ${c}Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
Hello Hello
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -42,29 +42,29 @@ class ChangeVisualActionTest : VimTestCase() {
fun `test multiple line change in text middle`() { fun `test multiple line change in text middle`() {
val keys = "Vjc" val keys = "Vjc"
val before = """ val before = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c} ${c}
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@VimBehaviorDiffers( @VimBehaviorDiffers(
originalVimAfter = """ originalVimAfter = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
""", """,
@ -73,19 +73,19 @@ class ChangeVisualActionTest : VimTestCase() {
fun `test multiple line change till the end`() { fun `test multiple line change till the end`() {
val keys = "Vjc" val keys = "Vjc"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
""".trimIndent() """.trimIndent()
@ -96,21 +96,21 @@ class ChangeVisualActionTest : VimTestCase() {
fun `test multiple line change till the end with two new lines`() { fun `test multiple line change till the end with two new lines`() {
val keys = "Vjc" val keys = "Vjc"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
@ -124,7 +124,7 @@ class ChangeVisualActionTest : VimTestCase() {
fun `test change with dollar motion`() { fun `test change with dollar motion`() {
val keys = listOf("<C-V>3j$", "c", "Hello<Esc>") val keys = listOf("<C-V>3j$", "c", "Hello<Esc>")
val before = """ val before = """
A Discovery Lorem Ipsum
I |${c}found it in a legendary land I |${c}found it in a legendary land
al|l rocks and lavender and tufted grass,[ additional symbols] al|l rocks and lavender and tufted grass,[ additional symbols]
@ -132,7 +132,7 @@ class ChangeVisualActionTest : VimTestCase() {
ha|rd by the torrent of a mountain pass. ha|rd by the torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I |Hello I |Hello
al|Hello al|Hello
@ -145,7 +145,7 @@ class ChangeVisualActionTest : VimTestCase() {
@Test @Test
fun `test replace first line`() { fun `test replace first line`() {
val keys = "VcHello<esc>" val keys = "VcHello<esc>"
val before = "${c}A Discovery" val before = "${c}Lorem Ipsum"
val after = "Hello" val after = "Hello"
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }

View File

@ -20,19 +20,19 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
fun `test change last line`() { fun `test change last line`() {
val keys = "VC" val keys = "VC"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c} ${c}
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
@ -42,21 +42,21 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
fun `test last empty line`() { fun `test last empty line`() {
val keys = "vC" val keys = "vC"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
${c} ${c}
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
${c} ${c}
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
@ -64,11 +64,11 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
originalVimAfter = """ originalVimAfter = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c} ${c}
""", """,
) )
@ -76,20 +76,20 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
fun `test change last two lines`() { fun `test change last two lines`() {
val keys = "vjC" val keys = "vjC"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass${c}. hard by the torrent of a mountain pass${c}.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c} ${c}
""".trimIndent() """.trimIndent()

View File

@ -37,20 +37,20 @@ class DeleteCharacterLeftActionTest : VimTestCase() {
fun `test deletes min of count and start of line`() { fun `test deletes min of count and start of line`() {
val keys = "25X" val keys = "25X"
val before = """ val before = """
A Discovery Lorem Ipsum
I found$c it in a legendary land I found$c it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
$c it in a legendary land $c it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)

View File

@ -38,20 +38,20 @@ class DeleteCharacterRightActionTest : VimTestCase() {
fun `test deletes min of count and end of line`() { fun `test deletes min of count and end of line`() {
val keys = injector.parser.parseKeys("20x") val keys = injector.parser.parseKeys("20x")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary l${c}and I found it in a legendary l${c}and
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary ${c}l I found it in a legendary ${c}l
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(keys) typeText(keys)

View File

@ -18,16 +18,16 @@ class DeleteEndOfLineActionTest : VimTestCase() {
doTest( doTest(
"D", "D",
""" """
A Discovery Lorem Ipsum
$c $c
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
$c $c
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -24,19 +24,19 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
doTest( doTest(
"J", "J",
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land$c all rocks and lavender and tufted grass, Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -48,18 +48,18 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
doTest( doTest(
"3J", "3J",
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land all rocks and lavender and tufted grass,$c where it was settled on some sodden sand Lorem ipsum dolor sit amet, consectetur adipiscing elit$c Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -72,20 +72,20 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
doTest( doTest(
"10J", "10J",
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -25,19 +25,19 @@ class DeleteJoinVisualLinesSpacesActionTest : VimTestCase() {
doTest( doTest(
"VjJ", "VjJ",
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land all rocks and lavender and tufted grass, ${c}Lorem ipsum dolor sit amet, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -155,19 +155,19 @@ class DeleteMotionActionTest : VimTestCase() {
@Test @Test
fun `test delete empty line`() { fun `test delete empty line`() {
val file = """ val file = """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val newFile = """ val newFile = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
typeTextInFile("dd", file) typeTextInFile("dd", file)
assertState(newFile) assertState(newFile)
@ -178,17 +178,17 @@ class DeleteMotionActionTest : VimTestCase() {
doTest( doTest(
"dd", "dd",
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
} }
@ -198,21 +198,21 @@ class DeleteMotionActionTest : VimTestCase() {
doTest( doTest(
"dd", "dd",
""" """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -25,20 +25,20 @@ class DeleteVisualActionTest : VimTestCase() {
fun `test delete block SE direction`() { fun `test delete block SE direction`() {
val keys = listOf("<C-V>e2j", "d") val keys = listOf("<C-V>e2j", "d")
val before = """ val before = """
A Discovery Lorem Ipsum
I |${c}found| it in a legendary land I |${c}found| it in a legendary land
al|l roc|ks and lavender and tufted grass, al|l roc|ks and lavender and tufted grass,
wh|ere i|t was settled on some sodden sand wh|ere i|t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I |$c| it in a legendary land I |$c| it in a legendary land
al||ks and lavender and tufted grass, al||ks and lavender and tufted grass,
wh||t was settled on some sodden sand wh||t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -47,20 +47,20 @@ class DeleteVisualActionTest : VimTestCase() {
fun `test delete block SW direction`() { fun `test delete block SW direction`() {
val keys = listOf("<C-V>b2j", "d") val keys = listOf("<C-V>b2j", "d")
val before = """ val before = """
A Discovery Lorem Ipsum
I |foun${c}d| it in a legendary land I |foun${c}d| it in a legendary land
al|l roc|ks and lavender and tufted grass, al|l roc|ks and lavender and tufted grass,
wh|ere i|t was settled on some sodden sand wh|ere i|t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I |$c| it in a legendary land I |$c| it in a legendary land
al||ks and lavender and tufted grass, al||ks and lavender and tufted grass,
wh||t was settled on some sodden sand wh||t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -69,20 +69,20 @@ class DeleteVisualActionTest : VimTestCase() {
fun `test delete block NW direction`() { fun `test delete block NW direction`() {
val keys = listOf("<C-V>b2k", "d") val keys = listOf("<C-V>b2k", "d")
val before = """ val before = """
A Discovery Lorem Ipsum
I |found| it in a legendary land I |found| it in a legendary land
al|l roc|ks and lavender and tufted grass, al|l roc|ks and lavender and tufted grass,
wh|ere ${c}i|t was settled on some sodden sand wh|ere ${c}i|t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I |$c| it in a legendary land I |$c| it in a legendary land
al||ks and lavender and tufted grass, al||ks and lavender and tufted grass,
wh||t was settled on some sodden sand wh||t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -91,20 +91,20 @@ class DeleteVisualActionTest : VimTestCase() {
fun `test delete block NE direction`() { fun `test delete block NE direction`() {
val keys = listOf("<C-V>2e2k", "d") val keys = listOf("<C-V>2e2k", "d")
val before = """ val before = """
A Discovery Lorem Ipsum
I |found| it in a legendary land I |found| it in a legendary land
al|l roc|ks and lavender and tufted grass, al|l roc|ks and lavender and tufted grass,
wh|${c}ere i|t was settled on some sodden sand wh|${c}ere i|t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I |$c| it in a legendary land I |$c| it in a legendary land
al||ks and lavender and tufted grass, al||ks and lavender and tufted grass,
wh||t was settled on some sodden sand wh||t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -116,12 +116,12 @@ class DeleteVisualActionTest : VimTestCase() {
// In short, when caret is not on the selection end // In short, when caret is not on the selection end
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${s}I found it in a legendary land ${s}Lorem ipsum dolor sit amet,
all rocks ${c}and lavender and tufted grass, all rocks ${c}and lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
${se}hard by the torrent of a mountain pass. ${se}Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
IdeaSelectionControl.controlNonVimSelectionChange(fixture.editor) IdeaSelectionControl.controlNonVimSelectionChange(fixture.editor)
@ -129,9 +129,9 @@ class DeleteVisualActionTest : VimTestCase() {
typeText(injector.parser.parseKeys("d")) typeText(injector.parser.parseKeys("d"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertState(VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) assertState(VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
@ -141,7 +141,7 @@ class DeleteVisualActionTest : VimTestCase() {
fun `test delete with dollar motion`() { fun `test delete with dollar motion`() {
val keys = listOf("<C-V>3j$", "d") val keys = listOf("<C-V>3j$", "d")
val before = """ val before = """
A Discovery Lorem Ipsum
I |${c}found it in a legendary land I |${c}found it in a legendary land
al|l rocks and lavender and tufted grass,[ additional symbols] al|l rocks and lavender and tufted grass,[ additional symbols]
@ -149,7 +149,7 @@ class DeleteVisualActionTest : VimTestCase() {
ha|rd by the torrent of a mountain pass. ha|rd by the torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I | I |
al| al|

View File

@ -21,14 +21,14 @@ class DeleteVisualLinesActionTest : VimTestCase() {
"vlllX", "vlllX",
""" """
I found ${c}it in a legendary land I found ${c}it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -40,15 +40,15 @@ class DeleteVisualLinesActionTest : VimTestCase() {
doTest( doTest(
"vlllX", "vlllX",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by ${c}the torrent of a mountain pass. hard by ${c}the torrent of a mountain pass.
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -61,14 +61,14 @@ class DeleteVisualLinesActionTest : VimTestCase() {
"VX", "VX",
""" """
I found ${c}it in a legendary land I found ${c}it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -80,15 +80,15 @@ class DeleteVisualLinesActionTest : VimTestCase() {
doTest( doTest(
"VX", "VX",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by ${c}the torrent of a mountain pass. hard by ${c}the torrent of a mountain pass.
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -99,19 +99,19 @@ class DeleteVisualLinesActionTest : VimTestCase() {
fun `test multiple line delete till the end`() { fun `test multiple line delete till the end`() {
val keys = "Vjd" val keys = "Vjd"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
@ -121,20 +121,20 @@ class DeleteVisualLinesActionTest : VimTestCase() {
fun `test multiple line delete till the end with a new line`() { fun `test multiple line delete till the end with a new line`() {
val keys = "Vjd" val keys = "Vjd"
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c} ${c}
""".trimIndent() """.trimIndent()

View File

@ -25,19 +25,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion`() { fun `test simple deletion`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -100,19 +100,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion with indent`() { fun `test simple deletion with indent`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -122,19 +122,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion with indent and nostartofline`() { fun `test simple deletion with indent and nostartofline`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c} all rocks and lavender and tufted grass, ${c} consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) { doTest(keys, before, after) {
enterCommand("set nostartofline") enterCommand("set nostartofline")
@ -145,19 +145,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion empty line`() { fun `test simple deletion empty line`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -166,20 +166,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion last line`() { fun `test simple deletion last line`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the ${c}torrent of a mountain pass. hard by the ${c}torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c} ${c}
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
@ -191,17 +191,17 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
val before = """ val before = """
A ${c}Discovery A ${c}Discovery
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -210,21 +210,21 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion before empty`() { fun `test simple deletion before empty`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
${c} ${c}
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -233,19 +233,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion last line without empty line`() { fun `test simple deletion last line without empty line`() {
val keys = listOf("v", "D") val keys = listOf("v", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the ${c}torrent of a mountain pass. hard by the ${c}torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -254,18 +254,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion multiline`() { fun `test simple deletion multiline`() {
val keys = listOf("vj", "D") val keys = listOf("vj", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -274,18 +274,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test simple deletion multiline motion up`() { fun `test simple deletion multiline motion up`() {
val keys = listOf("vk", "D") val keys = listOf("vk", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -313,19 +313,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line simple deletion`() { fun `test line simple deletion`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -334,19 +334,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion with indent`() { fun `test line deletion with indent`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -356,19 +356,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion with indent and nostartofline`() { fun `test line deletion with indent and nostartofline`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c} all rocks and lavender and tufted grass, ${c} consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) { doTest(keys, before, after) {
enterCommand("set nostartofline") enterCommand("set nostartofline")
@ -379,19 +379,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion empty line`() { fun `test line deletion empty line`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -400,20 +400,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion last line`() { fun `test line deletion last line`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the ${c}torrent of a mountain pass. hard by the ${c}torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c} ${c}
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
@ -423,19 +423,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion last line without empty line`() { fun `test line deletion last line without empty line`() {
val keys = listOf("V", "D") val keys = listOf("V", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the ${c}torrent of a mountain pass. hard by the ${c}torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -444,18 +444,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion multiline`() { fun `test line deletion multiline`() {
val keys = listOf("Vj", "D") val keys = listOf("Vj", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -464,18 +464,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test line deletion multiline motion up`() { fun `test line deletion multiline motion up`() {
val keys = listOf("Vk", "D") val keys = listOf("Vk", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all ${c}rocks and lavender and tufted grass, all ${c}rocks and lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -503,20 +503,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test block simple deletion`() { fun `test block simple deletion`() {
val keys = listOf("<C-V>", "D") val keys = listOf("<C-V>", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I I
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -525,20 +525,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test block deletion empty line`() { fun `test block deletion empty line`() {
val keys = listOf("<C-V>", "D") val keys = listOf("<C-V>", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
${c} ${c}
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }
@ -547,20 +547,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test block deletion last line`() { fun `test block deletion last line`() {
val keys = listOf("<C-V>", "D") val keys = listOf("<C-V>", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the${c} torrent of a mountain pass. hard by the${c} torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the hard by the
""".trimIndent() """.trimIndent()
@ -571,19 +571,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test block deletion last line without empty line`() { fun `test block deletion last line without empty line`() {
val keys = listOf("<C-V>", "D") val keys = listOf("<C-V>", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the${c} torrent of a mountain pass. hard by the${c} torrent of a mountain pass.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the hard by the
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
@ -593,20 +593,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
fun `test block deletion multiline`() { fun `test block deletion multiline`() {
val keys = listOf("<C-V>j", "D") val keys = listOf("<C-V>j", "D")
val before = """ val before = """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I I
a c
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after) doTest(keys, before, after)
} }

View File

@ -38,20 +38,20 @@ class InsertAfterLineEndActionTest : VimTestCase() {
doTest( doTest(
"AHello<esc>", "AHello<esc>",
""" """
${c}A Discovery ${c}Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and ${c}lavender and tufted grass, consectet${c}ur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A DiscoveryHell${c}o Lorem IpsumHell${c}o
I found it in a legendary landHell${c}o Lorem ipsum dolor sit amet,Hell${c}o
all rocks and lavender and tufted grass,Hell${c}o consectetur adipiscing elitHell${c}o
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -18,20 +18,20 @@ class InsertBeforeFirstNonBlankActionTest : VimTestCase() {
doTest( doTest(
"IHello<esc>", "IHello<esc>",
""" """
${c}A Discovery ${c}Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and ${c}lavender and tufted grass, consect${c}etur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
Hell${c}oA Discovery Hell${c}oLorem Ipsum
Hell${c}oI found it in a legendary land Hell${c}oLorem ipsum dolor sit amet,
Hell${c}oall rocks and lavender and tufted grass, Hell${c}oconsectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -20,12 +20,12 @@ class InsertDeleteInsertedTextActionTest : VimTestCase() {
doTest( doTest(
listOf("yiw", "ea", "Hello", "<C-U>", "<ESC>p"), listOf("yiw", "ea", "Hello", "<C-U>", "<ESC>p"),
""" """
A Discovery Lorem Ipsum
I found ${c}it in a legendary land I found ${c}it in a legendary land
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found iti${c}t in a legendary land I found iti${c}t in a legendary land
""".trimIndent(), """.trimIndent(),
@ -41,12 +41,12 @@ class InsertDeleteInsertedTextActionTest : VimTestCase() {
doTest( doTest(
listOf("yiw", "eR", "Hello", "<C-U>", "<ESC>p"), listOf("yiw", "eR", "Hello", "<C-U>", "<ESC>p"),
""" """
A Discovery Lorem Ipsum
I found ${c}it in a legendary land I found ${c}it in a legendary land
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found ii${c}ta legendary land I found ii${c}ta legendary land
""".trimIndent(), """.trimIndent(),

View File

@ -68,12 +68,12 @@ class InsertDeletePreviousWordActionTest : VimTestCase() {
doTest( doTest(
listOf("i", "<C-W>", "<C-W>", "<C-W>", "<C-W>"), listOf("i", "<C-W>", "<C-W>", "<C-W>", "<C-W>"),
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
""".trimIndent(), """.trimIndent(),
""" """
A Discovery${c} found it in a legendary land Lorem Ipsum${c} found it in a legendary land
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -17,16 +17,16 @@ import org.junit.jupiter.api.Test
class InsertEnterActionTest : VimTestCase() { class InsertEnterActionTest : VimTestCase() {
@Test @Test
fun `test insert enter`() { fun `test insert enter`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
| |
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest(listOf("i", "<Enter>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(listOf("i", "<Enter>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@ -34,16 +34,16 @@ class InsertEnterActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.CTRL_CODES) @TestWithoutNeovim(SkipNeovimReason.CTRL_CODES)
@Test @Test
fun `test insert enter with C-M`() { fun `test insert enter with C-M`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
| |
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest(listOf("i", "<C-M>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest(listOf("i", "<C-M>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@ -51,7 +51,7 @@ class InsertEnterActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.OPTION) @TestWithoutNeovim(SkipNeovimReason.OPTION)
@Test @Test
fun `test insert enter scrolls view up at scrolloff`() { fun `test insert enter scrolls view up at scrolloff`() {
configureByLines(50, "I found it in a legendary land") configureByLines(50, "Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setPositionAndScroll(5, 29) setPositionAndScroll(5, 29)
typeText("i", "<Enter>") typeText("i", "<Enter>")

View File

@ -17,16 +17,16 @@ import org.junit.jupiter.api.Test
class InsertNewLineAboveActionTest : VimTestCase() { class InsertNewLineAboveActionTest : VimTestCase() {
@Test @Test
fun `test insert new line above`() { fun `test insert new line above`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|$c |$c
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@ -49,32 +49,32 @@ class InsertNewLineAboveActionTest : VimTestCase() {
@Test @Test
fun `test insert new line above matches indent for plain text`() { fun `test insert new line above matches indent for plain text`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| ${c}where it was settled on some sodden sand | ${c}Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| $c | $c
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@Test @Test
fun `test insert new line above matches indent for first line of plain text`() { fun `test insert new line above matches indent for first line of plain text`() {
val before = """ ${c}I found it in a legendary land val before = """ ${c}Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """ $c val after = """ $c
| I found it in a legendary land | Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }
@ -120,7 +120,7 @@ class InsertNewLineAboveActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.OPTION) @TestWithoutNeovim(SkipNeovimReason.OPTION)
@Test @Test
fun `test insert new line above at top of screen does not scroll top of screen`() { fun `test insert new line above at top of screen does not scroll top of screen`() {
configureByLines(50, "I found it in a legendary land") configureByLines(50, "Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setPositionAndScroll(5, 15) setPositionAndScroll(5, 15)
typeText("O") typeText("O")
@ -130,17 +130,17 @@ class InsertNewLineAboveActionTest : VimTestCase() {
@Test @Test
fun `test insert new line above first line`() { fun `test insert new line above first line`() {
val before = """${c}I found it in a legendary land val before = """${c}Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """ val after = """
|$c |$c
|I found it in a legendary land |Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE) doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
} }

View File

@ -34,13 +34,13 @@ class PutViaIdeaTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT) @TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
@OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput])) @OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput]))
fun `test simple insert via idea`() { fun `test simple insert via idea`() {
val before = "${c}I found it in a legendary land" val before = "${c}Lorem ipsum dolor sit amet,"
configureByText(before) configureByText(before)
injector.registerGroup.storeText('"', "legendary", SelectionType.CHARACTER_WISE) injector.registerGroup.storeText('"', "legendary", SelectionType.CHARACTER_WISE)
typeText("ve", "p") typeText("ve", "p")
val after = "legendar${c}y it in a legendary land" val after = "legendar${c}y ipsum dolor sit amet,"
assertState(after) assertState(after)
} }
@ -87,11 +87,11 @@ class PutViaIdeaTest : VimTestCase() {
@OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput])) @OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput]))
fun `test insert block with newline`() { fun `test insert block with newline`() {
val before = """ val before = """
A Discovery Lorem Ipsum
$c $c
I found it in a legendary land Lorem ipsum dolor sit amet,
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
@ -99,20 +99,20 @@ class PutViaIdeaTest : VimTestCase() {
VimPlugin.getRegister().storeText( VimPlugin.getRegister().storeText(
vimEditor, vimEditor,
vimEditor.primaryCaret(), vimEditor.primaryCaret(),
before rangeOf "\nI found it in a legendary land\n", before rangeOf "\nLorem ipsum dolor sit amet,\n",
SelectionType.CHARACTER_WISE, SelectionType.CHARACTER_WISE,
false, false,
) )
typeText("p") typeText("p")
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
I found it in a legendary land Lorem ipsum dolor sit amet,
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
assertState(after) assertState(after)
} }

View File

@ -21,7 +21,7 @@ class YankAndPutTest : VimTestCase() {
fun `test yank to number register with unnamed`() { fun `test yank to number register with unnamed`() {
val before = """ val before = """
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
// Select and yank first word // Select and yank first word
@ -34,7 +34,7 @@ class YankAndPutTest : VimTestCase() {
assertState( assertState(
""" """
I it found in a legendary land I it found in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
} }
@ -43,7 +43,7 @@ class YankAndPutTest : VimTestCase() {
fun `test yank to number register with unnamed and ideaput`() { fun `test yank to number register with unnamed and ideaput`() {
val before = """ val before = """
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
// Select and yank first word // Select and yank first word
@ -56,7 +56,7 @@ class YankAndPutTest : VimTestCase() {
assertState( assertState(
""" """
I it found in a legendary land I it found in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
} }
@ -65,7 +65,7 @@ class YankAndPutTest : VimTestCase() {
fun `test yank to number register`() { fun `test yank to number register`() {
val before = """ val before = """
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
// Select and yank first word // Select and yank first word
@ -78,7 +78,7 @@ class YankAndPutTest : VimTestCase() {
assertState( assertState(
""" """
I it found in a legendary land I it found in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -17,12 +17,12 @@ class YankLineActionTest : VimTestCase() {
@Test @Test
fun `test yank to number register`() { fun `test yank to number register`() {
val before = """ val before = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent() """.trimIndent()
configureByText(before) configureByText(before)
typeText(injector.parser.parseKeys("\"4yy")) typeText(injector.parser.parseKeys("\"4yy"))
val register = VimPlugin.getRegister().getRegister('4')!! val register = VimPlugin.getRegister().getRegister('4')!!
kotlin.test.assertEquals("I found it in a legendary land\n", register.text) kotlin.test.assertEquals("Lorem ipsum dolor sit amet,\n", register.text)
} }
} }

View File

@ -17,12 +17,12 @@ class YankMotionActionTest : VimTestCase() {
@Test @Test
fun `test yank till new line`() { fun `test yank till new line`() {
val file = """ val file = """
A Discovery Lorem Ipsum
I found it in a legendary l${c}and I found it in a legendary l${c}and
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
typeTextInFile("yW", file) typeTextInFile("yW", file)
val text = VimPlugin.getRegister().lastRegister?.text ?: kotlin.test.fail() val text = VimPlugin.getRegister().lastRegister?.text ?: kotlin.test.fail()
@ -33,12 +33,12 @@ class YankMotionActionTest : VimTestCase() {
@Test @Test
fun `test yank caret doesn't move`() { fun `test yank caret doesn't move`() {
val file = """ val file = """
A Discovery Lorem Ipsum
I found it in a legendary l${c}and I found it in a legendary l${c}and
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(file) configureByText(file)
@ -90,10 +90,10 @@ class YankMotionActionTest : VimTestCase() {
val file = """ val file = """
A ${c}Discovery A ${c}Discovery
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
typeTextInFile("yk", file) typeTextInFile("yk", file)
@ -103,12 +103,12 @@ class YankMotionActionTest : VimTestCase() {
@Test @Test
fun `test yank dollar at last empty line`() { fun `test yank dollar at last empty line`() {
val file = """ val file = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
$c $c
""".trimIndent() """.trimIndent()
typeTextInFile("y$", file) typeTextInFile("y$", file)
@ -120,12 +120,12 @@ class YankMotionActionTest : VimTestCase() {
@Test @Test
fun `test yank to star with mapping`() { fun `test yank to star with mapping`() {
val file = """ val file = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
typeTextInFile(commandToKeys("map * *zz"), file) typeTextInFile(commandToKeys("map * *zz"), file)
typeTextInFile("\"*yiw", file) typeTextInFile("\"*yiw", file)
@ -137,12 +137,12 @@ class YankMotionActionTest : VimTestCase() {
@Test @Test
fun `test yank to star with yank mapping`() { fun `test yank to star with yank mapping`() {
val file = """ val file = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
typeTextInFile(commandToKeys("map * *yiw"), file) typeTextInFile(commandToKeys("map * *yiw"), file)
typeTextInFile("\"*", file) typeTextInFile("\"*", file)

View File

@ -231,20 +231,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Left>"), listOf("v", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${s}${c} f${se}ound it in a legendary land I${s}${c} f${se}ound it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,
@ -257,20 +257,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Left>"), listOf("v", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -283,20 +283,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Left>"), listOf("v", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${s}${c} f${se}ound it in a legendary land I${s}${c} f${se}ound it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,
@ -309,20 +309,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Left>"), listOf("v", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -335,20 +335,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Left>"), listOf("v", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and ${c}lavender and tufted grass, all rocks and ${c}lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and${c} lavender and tufted grass, all rocks and${c} lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -189,20 +189,20 @@ class MotionArrowRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Right>"), listOf("v", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}f${c}o${se}und it in a legendary land I ${s}f${c}o${se}und it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,
@ -215,20 +215,20 @@ class MotionArrowRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Right>"), listOf("v", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I f${c}ound it in a legendary land I f${c}ound it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -241,20 +241,20 @@ class MotionArrowRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Right>"), listOf("v", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}f${c}o${se}und it in a legendary land I ${s}f${c}o${se}und it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,
@ -267,20 +267,20 @@ class MotionArrowRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Right>"), listOf("v", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I f${c}ound it in a legendary land I f${c}ound it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -293,20 +293,20 @@ class MotionArrowRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "<Right>"), listOf("v", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and ${c}lavender and tufted grass, all rocks and ${c}lavender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I f${c}ound it in a legendary land I f${c}ound it in a legendary land
all rocks and l${c}avender and tufted grass, all rocks and l${c}avender and tufted grass,
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -26,20 +26,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test motion end`() { fun `test motion end`() {
val keys = listOf("<End>") val keys = listOf("<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -49,20 +49,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test continue visual`() { fun `test continue visual`() {
val keys = listOf("v", "<End>") val keys = listOf("v", "<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a ${s}legendary land${c}${se} I found it in a ${s}legendary land${c}${se}
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER) doTest(keys, before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER)
} }
@ -72,20 +72,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test continue select`() { fun `test continue select`() {
val keys = listOf("gh", "<End>") val keys = listOf("gh", "<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a ${s}legendary land${c}${se} I found it in a ${s}legendary land${c}${se}
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.SELECT, VimStateMachine.SubMode.VISUAL_CHARACTER) doTest(keys, before, after, VimStateMachine.Mode.SELECT, VimStateMachine.SubMode.VISUAL_CHARACTER)
} }
@ -95,20 +95,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test exit visual`() { fun `test exit visual`() {
val keys = listOf("v", "<End>") val keys = listOf("v", "<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -118,20 +118,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test exit select`() { fun `test exit select`() {
val keys = listOf("gh", "<End>") val keys = listOf("gh", "<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a ${c}legendary land I found it in a ${c}legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -141,20 +141,20 @@ class MotionEndActionTest : VimTestCase() {
fun `test delete to the end`() { fun `test delete to the end`() {
val keys = listOf("d", "<End>") val keys = listOf("d", "<End>")
val before = """ val before = """
A Discovery Lorem Ipsum
I found it in a leg${c}endary land I found it in a leg${c}endary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
A Discovery Lorem Ipsum
I found it in a le${c}g I found it in a le${c}g
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }

View File

@ -26,20 +26,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"l", "l",
""" """
A Discovery Lorem Ipsum
I found ${c}it in a legendary land I found ${c}it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found i${c}t in a legendary land I found i${c}t in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -51,20 +51,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"3l", "3l",
""" """
A Discovery Lorem Ipsum
I found ${c}it in a legendary land I found ${c}it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it ${c}in a legendary land I found it ${c}in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -76,20 +76,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"3l", "3l",
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -142,20 +142,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"l", "l",
""" """
A Discovery Lorem Ipsum
I found it in a legendar${c}𝛁 land I found it in a legendar${c}𝛁 land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendar𝛁${c} land I found it in a legendar𝛁${c} land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -168,20 +168,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"l", "l",
""" """
A Discovery Lorem Ipsum
I found it in a legendar${c}🐔 land I found it in a legendar${c}🐔 land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendar🐔${c} land I found it in a legendar🐔${c} land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -194,20 +194,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"l", "l",
""" """
A Discovery Lorem Ipsum
I found it in a legendar${c}ž land I found it in a legendar${c}ž land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendarž${c} land I found it in a legendarž${c} land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -219,19 +219,19 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
"l", "l",
""" """
A Discovery Lorem Ipsum
I found it in a legendar${c}. land I found it in a legendar${c}. land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass hard by the torrent of a mountain pass
""".trimIndent().dotToTab(), """.trimIndent().dotToTab(),
""" """
A Discovery Lorem Ipsum
I found it in a legendar.${c} land I found it in a legendar.${c} land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass hard by the torrent of a mountain pass
""".trimIndent().dotToTab(), """.trimIndent().dotToTab(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
@ -244,20 +244,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
listOf("v", "ll"), listOf("v", "ll"),
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${s}d${c}${se} I found it in a legendary lan${s}d${c}${se}
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,
@ -269,20 +269,20 @@ class MotionRightActionTest : VimTestCase() {
doTest( doTest(
listOf("<C-V>", "ll"), listOf("<C-V>", "ll"),
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${c}d I found it in a legendary lan${c}d
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary lan${s}d${c}${se} I found it in a legendary lan${s}d${c}${se}
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_BLOCK, VimStateMachine.SubMode.VISUAL_BLOCK,

View File

@ -26,12 +26,12 @@ class MotionMarkActionTest : VimTestCase() {
fun `test simple add mark`() { fun `test simple add mark`() {
val keys = injector.parser.parseKeys("mA") val keys = injector.parser.parseKeys("mA")
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
typeText(keys) typeText(keys)
@ -42,12 +42,12 @@ class MotionMarkActionTest : VimTestCase() {
fun `test simple add multiple marks`() { fun `test simple add multiple marks`() {
val keys = injector.parser.parseKeys("mAj" + "mBj" + "mC") val keys = injector.parser.parseKeys("mAj" + "mBj" + "mC")
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
typeText(keys) typeText(keys)
@ -58,12 +58,12 @@ class MotionMarkActionTest : VimTestCase() {
fun `test simple add multiple marks on same line`() { fun `test simple add multiple marks on same line`() {
val keys = injector.parser.parseKeys("mA" + "mB" + "mC") val keys = injector.parser.parseKeys("mA" + "mB" + "mC")
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
typeText(keys) typeText(keys)
@ -77,12 +77,12 @@ class MotionMarkActionTest : VimTestCase() {
fun `test move to another line`() { fun `test move to another line`() {
val keys = injector.parser.parseKeys("mAjj" + "mA") val keys = injector.parser.parseKeys("mAjj" + "mA")
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
typeText(keys) typeText(keys)
@ -92,12 +92,12 @@ class MotionMarkActionTest : VimTestCase() {
@OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"]))
fun `test simple system mark`() { fun `test simple system mark`() {
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
fixture.project.createLineBookmark(fixture.editor, 2, 'A') fixture.project.createLineBookmark(fixture.editor, 2, 'A')
@ -110,12 +110,12 @@ class MotionMarkActionTest : VimTestCase() {
@OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"])) @OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"]))
fun `test system mark move to another line`() { fun `test system mark move to another line`() {
val text = """ val text = """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)

View File

@ -18,15 +18,15 @@ class MotionInnerBigWordActionTest : VimTestCase() {
doTest( doTest(
"diW", "diW",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass$c. hard by the torrent of a mountain pass$c.
""".trimIndent(), """.trimIndent(),
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain$c hard by the torrent of a mountain$c
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,

View File

@ -16,9 +16,9 @@ import org.junit.jupiter.api.Test
class MotionOuterSentenceActionTest : VimTestCase() { class MotionOuterSentenceActionTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
originalVimAfter = """ originalVimAfter = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
$c $c
""", """,
) )
@ -27,15 +27,15 @@ class MotionOuterSentenceActionTest : VimTestCase() {
doTest( doTest(
"=as", "=as",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
$c $c
""".trimIndent(), """.trimIndent(),
""" """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
@ -45,9 +45,9 @@ class MotionOuterSentenceActionTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
originalVimAfter = """ originalVimAfter = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
$c $c
""", """,
) )
@ -56,9 +56,9 @@ class MotionOuterSentenceActionTest : VimTestCase() {
doTest( doTest(
"das", "das",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
$c $c
""".trimIndent(), """.trimIndent(),
"\n", "\n",

View File

@ -20,20 +20,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
doTest( doTest(
"gH", "gH",
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
$s${c}I found it in a legendary land$se $s${c}Lorem ipsum dolor sit amet,$se
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
VimStateMachine.SubMode.VISUAL_LINE, VimStateMachine.SubMode.VISUAL_LINE,
@ -45,19 +45,19 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
doTest( doTest(
"gH", "gH",
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass$c. hard by the torrent of a mountain pass$c.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${s}hard by the torrent of a mountain pass$c.$se ${s}hard by the torrent of a mountain pass$c.$se
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
@ -70,20 +70,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
doTest( doTest(
"gH", "gH",
""" """
A Discovery Lorem Ipsum
$c $c
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
$s$c$se $s$c$se
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
VimStateMachine.SubMode.VISUAL_LINE, VimStateMachine.SubMode.VISUAL_LINE,
@ -96,20 +96,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
doTest( doTest(
listOf("gH"), listOf("gH"),
""" """
A Discovery Lorem Ipsum
$c $c
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was ${c}settled on ${c}some sodden sand where it was ${c}settled on ${c}some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
$s$c$se $s$c$se
$s${c}I found it in a legendary land$se $s${c}Lorem ipsum dolor sit amet,$se
all rocks and lavender and tufted grass, consectetur adipiscing elit
${s}where it was ${c}settled on some sodden sand$se ${s}where it was ${c}settled on some sodden sand$se
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
VimStateMachine.SubMode.VISUAL_LINE, VimStateMachine.SubMode.VISUAL_LINE,

View File

@ -32,20 +32,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("viw", "<C-G>", "<Left>"), listOf("viw", "<C-G>", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I foun${c}d it in a legendary land I foun${c}d it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -58,20 +58,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("viwo", "<C-G>", "<Left>"), listOf("viwo", "<C-G>", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -84,20 +84,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
doTest( doTest(
listOf("viw", "<C-G>", "<Left>"), listOf("viw", "<C-G>", "<Left>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}foun${c}${se}d it in a legendary land I ${s}foun${c}${se}d it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,

View File

@ -27,20 +27,20 @@ class SelectMotionRightActionTest : VimTestCase() {
doTest( doTest(
listOf("viw", "<C-G>", "<Right>"), listOf("viw", "<C-G>", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found${c} it in a legendary land I found${c} it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -53,20 +53,20 @@ class SelectMotionRightActionTest : VimTestCase() {
doTest( doTest(
listOf("viw", "<C-G>", "<Right>"), listOf("viw", "<C-G>", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden san${c}d where it was settled on some sodden san${c}d
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found${c} it in a legendary land I found${c} it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden san${c}d where it was settled on some sodden san${c}d
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -79,20 +79,20 @@ class SelectMotionRightActionTest : VimTestCase() {
doTest( doTest(
listOf("viw", "<C-G>", "<Right>"), listOf("viw", "<C-G>", "<Right>"),
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}found ${c}${se}it in a legendary land I ${s}found ${c}${se}it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.SELECT, VimStateMachine.Mode.SELECT,
VimStateMachine.SubMode.VISUAL_CHARACTER, VimStateMachine.SubMode.VISUAL_CHARACTER,

View File

@ -21,9 +21,9 @@ class MotionParagraphPreviousActionTest : VimTestCase() {
"d{", "d{",
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass$c. hard by the torrent of a mountain pass$c.
""".trimIndent(), """.trimIndent(),
".", ".",

View File

@ -20,10 +20,10 @@ class MotionSectionForwardEndActionTest : VimTestCase() {
doTest( doTest(
"d][", "d][",
""" """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
"$c.", "$c.",
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
@ -37,10 +37,10 @@ class MotionSectionForwardEndActionTest : VimTestCase() {
doTest( doTest(
"d][", "d][",
""" """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
"$c.\n", "$c.\n",

View File

@ -182,7 +182,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test scrolling positions target line in middle of screen`() { fun `test scrolling positions target line in middle of screen`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
typeText("70G") typeText("70G")
assertPosition(69, 4) assertPosition(69, 4)
assertVisibleArea(52, 86) assertVisibleArea(52, 86)
@ -190,7 +190,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to last line of file puts target line at bottom of screen`() { fun `test go to last line of file puts target line at bottom of screen`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
typeText("G") typeText("G")
assertPosition(99, 4) assertPosition(99, 4)
assertVisibleArea(65, 99) assertVisibleArea(65, 99)
@ -198,7 +198,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to last line of file puts target line at bottom of screen with virtual space enabled`() { fun `test go to last line of file puts target line at bottom of screen with virtual space enabled`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setEditorVirtualSpace() setEditorVirtualSpace()
typeText("G") typeText("G")
assertPosition(99, 4) assertPosition(99, 4)
@ -207,7 +207,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line in last half screen of file puts last line at bottom of screen`() { fun `test go to line in last half screen of file puts last line at bottom of screen`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
typeText("90G") typeText("90G")
assertPosition(89, 4) assertPosition(89, 4)
assertVisibleArea(65, 99) assertVisibleArea(65, 99)
@ -215,7 +215,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line in last half screen of file puts last line at bottom of screen ignoring scrolloff`() { fun `test go to line in last half screen of file puts last line at bottom of screen ignoring scrolloff`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
typeText("95G") typeText("95G")
assertPosition(94, 4) assertPosition(94, 4)
@ -225,7 +225,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line does not scroll when default virtual space already at bottom of file`() { fun `test go to line does not scroll when default virtual space already at bottom of file`() {
// Editor has 5 lines of virtual space by default // Editor has 5 lines of virtual space by default
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(69, 85) setPositionAndScroll(69, 85)
typeText("G") typeText("G")
assertPosition(99, 4) assertPosition(99, 4)
@ -234,7 +234,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line does not scroll when full virtual space already at bottom of file`() { fun `test go to line does not scroll when full virtual space already at bottom of file`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(85, 85) setPositionAndScroll(85, 85)
typeText("G") typeText("G")
@ -244,7 +244,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line does not scroll when last line is less than scrolloff above bottom of file`() { fun `test go to line does not scroll when last line is less than scrolloff above bottom of file`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(67, 97) setPositionAndScroll(67, 97)
@ -255,7 +255,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
@Test @Test
fun `test go to line does not scroll when last line is less than scrolloff above bottom of file with folds`() { fun `test go to line does not scroll when last line is less than scrolloff above bottom of file with folds`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
typeText("20G", "V10j", ":'< +'>action CollapseSelection<CR>", "V") typeText("20G", "V10j", ":'< +'>action CollapseSelection<CR>", "V")

View File

@ -20,20 +20,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
doTest( doTest(
"1<C-V>", "1<C-V>",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}${c}f${se}ound it in a legendary land I ${s}${c}f${se}ound it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_BLOCK, VimStateMachine.SubMode.VISUAL_BLOCK,
@ -45,20 +45,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
doTest( doTest(
"5<C-V>", "5<C-V>",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}foun${c}d${se} it in a legendary land I ${s}foun${c}d${se} it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_BLOCK, VimStateMachine.SubMode.VISUAL_BLOCK,
@ -70,20 +70,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
doTest( doTest(
"100<C-V>", "100<C-V>",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I ${s}found it in a legendary land${c}${se} I ${s}found it in a legendary land${c}${se}
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_BLOCK, VimStateMachine.SubMode.VISUAL_BLOCK,
@ -105,12 +105,12 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
fun `test selectmode option`() { fun `test selectmode option`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand[long line] Sed in orci mauris.[long line]
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
enterCommand("set selectmode=cmd") enterCommand("set selectmode=cmd")

View File

@ -20,20 +20,20 @@ class VisualToggleLineModeActionTest : VimTestCase() {
doTest( doTest(
"1V", "1V",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${s}I ${c}found it in a legendary land ${s}I ${c}found it in a legendary land
${se}all rocks and lavender and tufted grass, ${se}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_LINE, VimStateMachine.SubMode.VISUAL_LINE,
@ -45,20 +45,20 @@ class VisualToggleLineModeActionTest : VimTestCase() {
doTest( doTest(
"1V", "1V",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it ${c}was settled on some sodden sand where it ${c}was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${s}I ${c}found it in a legendary land ${s}I ${c}found it in a legendary land
${se}all rocks and lavender and tufted grass, ${se}consectetur adipiscing elit
${s}where it ${c}was settled on some sodden sand ${s}where it ${c}was settled on some sodden sand
${se}hard by the torrent of a mountain pass. ${se}Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.VISUAL, VimStateMachine.Mode.VISUAL,
VimStateMachine.SubMode.VISUAL_LINE, VimStateMachine.SubMode.VISUAL_LINE,
@ -119,12 +119,12 @@ class VisualToggleLineModeActionTest : VimTestCase() {
fun `test selectmode option`() { fun `test selectmode option`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I${c} found it in a legendary land I${c} found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand[long line] Sed in orci mauris.[long line]
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
enterCommand("set selectmode=cmd") enterCommand("set selectmode=cmd")

View File

@ -29,7 +29,7 @@ class ScrollFirstScreenLineActionTest : VimTestCase() {
@Test @Test
fun `test scroll current line to top of screen and leave cursor in current column`() { fun `test scroll current line to top of screen and leave cursor in current column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(0, 19, 14) setPositionAndScroll(0, 19, 14)
typeText("zt") typeText("zt")
assertPosition(19, 14) assertPosition(19, 14)

View File

@ -35,7 +35,7 @@ class ScrollFirstScreenLinePageStartActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scrolls to first non-blank in line`() { fun `test scrolls to first non-blank in line`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(0, 20) setPositionAndScroll(0, 20)
typeText("z+") typeText("z+")
assertPosition(35, 4) assertPosition(35, 4)

View File

@ -30,7 +30,7 @@ class ScrollFirstScreenLineStartActionTest : VimTestCase() {
@Test @Test
fun `test scroll current line to top of screen and move to first non-blank`() { fun `test scroll current line to top of screen and move to first non-blank`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(0, 19, 0) setPositionAndScroll(0, 19, 0)
typeText("z<CR>") typeText("z<CR>")
assertPosition(19, 4) assertPosition(19, 4)

View File

@ -143,7 +143,7 @@ class ScrollHalfPageDownActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll downwards puts cursor on first non-blank column`() { fun `test scroll downwards puts cursor on first non-blank column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(20, 25, 14) setPositionAndScroll(20, 25, 14)
typeText("<C-D>") typeText("<C-D>")
@ -154,7 +154,7 @@ class ScrollHalfPageDownActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll downwards keeps same column with nostartofline`() { fun `test scroll downwards keeps same column with nostartofline`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set nostartofline") enterCommand("set nostartofline")
setPositionAndScroll(20, 25, 14) setPositionAndScroll(20, 25, 14)

View File

@ -113,7 +113,7 @@ class ScrollHalfPageUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll up puts cursor on first non-blank column`() { fun `test scroll up puts cursor on first non-blank column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(50, 60, 14) setPositionAndScroll(50, 60, 14)
typeText("<C-U>") typeText("<C-U>")
assertPosition(43, 4) assertPosition(43, 4)
@ -123,7 +123,7 @@ class ScrollHalfPageUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll upwards keeps same column with nostartofline`() { fun `test scroll upwards keeps same column with nostartofline`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set nostartofline") enterCommand("set nostartofline")
setPositionAndScroll(50, 60, 14) setPositionAndScroll(50, 60, 14)
typeText("<C-U>") typeText("<C-U>")

View File

@ -27,7 +27,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
@Test @Test
fun `test scroll current line to bottom of screen and leave cursor in current column`() { fun `test scroll current line to bottom of screen and leave cursor in current column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(40, 60, 14) setPositionAndScroll(40, 60, 14)
typeText("zb") typeText("zb")
assertPosition(60, 14) assertPosition(60, 14)
@ -84,7 +84,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
@Test @Test
fun `test scrolls last line to bottom of screen with virtual space`() { fun `test scrolls last line to bottom of screen with virtual space`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(80, 99, 4) setPositionAndScroll(80, 99, 4)
typeText("zb") typeText("zb")
@ -94,7 +94,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
@Test @Test
fun `test scrolls last line to bottom of screen with virtual space when caret less than scrolloff from bottom`() { fun `test scrolls last line to bottom of screen with virtual space when caret less than scrolloff from bottom`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(80, 97, 4) setPositionAndScroll(80, 97, 4)

View File

@ -36,7 +36,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
@Test @Test
fun `test scrolls to first non-blank in line`() { fun `test scrolls to first non-blank in line`() {
configureByLines(200, " I found it in a legendary land") configureByLines(200, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(99, 119) setPositionAndScroll(99, 119)
typeText("z^") typeText("z^")
assertPosition(98, 4) assertPosition(98, 4)
@ -77,7 +77,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test z^ on first page puts cursor on first line 1`() { fun `test z^ on first page puts cursor on first line 1`() {
configureByLines(50, " I found it in a legendary land") configureByLines(50, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(0, 25) setPositionAndScroll(0, 25)
typeText("z^") typeText("z^")
assertPosition(0, 4) assertPosition(0, 4)
@ -86,7 +86,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
@Test @Test
fun `test z^ on first page puts cursor on first line 2`() { fun `test z^ on first page puts cursor on first line 2`() {
configureByLines(50, " I found it in a legendary land") configureByLines(50, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(0, 6) setPositionAndScroll(0, 6)
typeText("z^") typeText("z^")
assertPosition(0, 4) assertPosition(0, 4)
@ -95,7 +95,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
@Test @Test
fun `test z^ on first page ignores scrolloff and puts cursor on last line of previous page`() { fun `test z^ on first page ignores scrolloff and puts cursor on last line of previous page`() {
configureByLines(50, " I found it in a legendary land") configureByLines(50, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setPositionAndScroll(0, 6) setPositionAndScroll(0, 6)
typeText("z^") typeText("z^")
@ -105,7 +105,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
@Test @Test
fun `test z^ on second page puts cursor on previous last line`() { fun `test z^ on second page puts cursor on previous last line`() {
configureByLines(50, " I found it in a legendary land") configureByLines(50, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(19, 39) setPositionAndScroll(19, 39)
typeText("z^") typeText("z^")
assertPosition(18, 4) assertPosition(18, 4)

View File

@ -29,7 +29,7 @@ class ScrollLastScreenLineStartActionTest : VimTestCase() {
@Test @Test
fun `test scroll current line to bottom of screen and move cursor to first non-blank`() { fun `test scroll current line to bottom of screen and move cursor to first non-blank`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(40, 60, 14) setPositionAndScroll(40, 60, 14)
typeText("z-") typeText("z-")
assertPosition(60, 4) assertPosition(60, 4)

View File

@ -112,7 +112,7 @@ class ScrollLineDownActionTest : VimTestCase() {
@Test @Test
fun `test scroll last line down at end of file with virtual space`() { fun `test scroll last line down at end of file with virtual space`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(75, 99, 4) setPositionAndScroll(75, 99, 4)
typeText("<C-E>") typeText("<C-E>")
@ -122,7 +122,7 @@ class ScrollLineDownActionTest : VimTestCase() {
@Test @Test
fun `test scroll line down at end of file with virtual space and scrolloff`() { fun `test scroll line down at end of file with virtual space and scrolloff`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(75, 95, 4) setPositionAndScroll(75, 95, 4)

View File

@ -126,7 +126,7 @@ class ScrollLineUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll line up with virtual space`() { fun `test scroll line up with virtual space`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(85, 90, 4) setPositionAndScroll(85, 90, 4)
typeText("<C-Y>") typeText("<C-Y>")
@ -136,7 +136,7 @@ class ScrollLineUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll line up with virtual space and scrolloff`() { fun `test scroll line up with virtual space and scrolloff`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
// Last line is scrolloff from top. <C-Y> should just move last line down // Last line is scrolloff from top. <C-Y> should just move last line down
@ -150,7 +150,7 @@ class ScrollLineUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll line up on last line with scrolloff`() { fun `test scroll line up on last line with scrolloff`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set scrolloff=10") enterCommand("set scrolloff=10")
setEditorVirtualSpace() setEditorVirtualSpace()
setPositionAndScroll(65, 99, 4) setPositionAndScroll(65, 99, 4)

View File

@ -30,7 +30,7 @@ class ScrollMiddleScreenLineActionTest : VimTestCase() {
@Test @Test
fun `test scrolls current line to middle of screen and keeps cursor in the same column`() { fun `test scrolls current line to middle of screen and keeps cursor in the same column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(40, 45, 14) setPositionAndScroll(40, 45, 14)
typeText("zz") typeText("zz")
assertPosition(45, 14) assertPosition(45, 14)

View File

@ -30,7 +30,7 @@ class ScrollMiddleScreenLineStartActionTest : VimTestCase() {
@Test @Test
fun `test scrolls current line to middle of screen and moves cursor to first non-blank`() { fun `test scrolls current line to middle of screen and moves cursor to first non-blank`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(40, 45, 14) setPositionAndScroll(40, 45, 14)
typeText("z.") typeText("z.")
assertPosition(45, 4) assertPosition(45, 4)

View File

@ -260,7 +260,7 @@ class ScrollPageDownActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll page down puts cursor on first non-blank column`() { fun `test scroll page down puts cursor on first non-blank column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(20, 25, 14) setPositionAndScroll(20, 25, 14)
typeText("<C-F>") typeText("<C-F>")
assertPosition(53, 4) assertPosition(53, 4)
@ -270,7 +270,7 @@ class ScrollPageDownActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll page down keeps same column with nostartofline`() { fun `test scroll page down keeps same column with nostartofline`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set nostartofline") enterCommand("set nostartofline")
setPositionAndScroll(20, 25, 14) setPositionAndScroll(20, 25, 14)
typeText("<C-F>") typeText("<C-F>")

View File

@ -278,7 +278,7 @@ class ScrollPageUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll page up puts cursor on first non-blank column`() { fun `test scroll page up puts cursor on first non-blank column`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
setPositionAndScroll(50, 60, 14) setPositionAndScroll(50, 60, 14)
typeText("<C-B>") typeText("<C-B>")
assertPosition(51, 4) assertPosition(51, 4)
@ -288,7 +288,7 @@ class ScrollPageUpActionTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.SCROLL) @TestWithoutNeovim(SkipNeovimReason.SCROLL)
@Test @Test
fun `test scroll page up keeps same column with nostartofline`() { fun `test scroll page up keeps same column with nostartofline`() {
configureByLines(100, " I found it in a legendary land") configureByLines(100, " Lorem ipsum dolor sit amet,")
enterCommand("set nostartofline") enterCommand("set nostartofline")
setPositionAndScroll(50, 60, 14) setPositionAndScroll(50, 60, 14)
typeText("<C-B>") typeText("<C-B>")

View File

@ -17,8 +17,8 @@ import org.junit.jupiter.api.Test
class BufferCloseCommandTest : VimTestCase() { class BufferCloseCommandTest : VimTestCase() {
@Test @Test
fun `test close file by bd command`() { fun `test close file by bd command`() {
val psiFile1 = fixture.configureByText("A_Discovery1", "I found it in a legendary land") val psiFile1 = fixture.configureByText("A_Discovery1", "Lorem ipsum dolor sit amet,")
val psiFile2 = fixture.configureByText("A_Discovery2", "all rocks and lavender and tufted grass,") val psiFile2 = fixture.configureByText("A_Discovery2", "consectetur adipiscing elit")
fileManager.openFile(psiFile1.virtualFile, false) fileManager.openFile(psiFile1.virtualFile, false)
fileManager.openFile(psiFile2.virtualFile, true) fileManager.openFile(psiFile2.virtualFile, true)

View File

@ -23,10 +23,10 @@ import kotlin.test.assertNull
class DeleteMarksCommandTest : VimTestCase() { class DeleteMarksCommandTest : VimTestCase() {
private fun setUpMarks(marks: String) { private fun setUpMarks(marks: String) {
configureByText( configureByText(
"""I found it in a legendary land """Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
The features it combines mark it as new The features it combines mark it as new
to science: shape and shade -- the special tinge, to science: shape and shade -- the special tinge,

View File

@ -21,7 +21,7 @@ class ExitCommandTest : VimTestCase() {
neoVim.exitOnTearDown = false neoVim.exitOnTearDown = false
} }
@Suppress("IdeaVimAssertState") @Suppress("IdeaVimAssertState")
val psiFile = fixture.configureByText("A_Discovery", "I found it in a legendary land") val psiFile = fixture.configureByText("A_Discovery", "Lorem ipsum dolor sit amet,")
fileManager.openFile(psiFile.virtualFile, false) fileManager.openFile(psiFile.virtualFile, false)
kotlin.test.assertNotNull<Any>(fileManager.currentFile) kotlin.test.assertNotNull<Any>(fileManager.currentFile)
@ -35,7 +35,7 @@ class ExitCommandTest : VimTestCase() {
neoVim.exitOnTearDown = false neoVim.exitOnTearDown = false
} }
@Suppress("IdeaVimAssertState") @Suppress("IdeaVimAssertState")
val psiFile = fixture.configureByText("A_Discovery", "I found it in a legendary land") val psiFile = fixture.configureByText("A_Discovery", "Lorem ipsum dolor sit amet,")
fileManager.openFile(psiFile.virtualFile, false) fileManager.openFile(psiFile.virtualFile, false)
kotlin.test.assertNotNull<Any>(fileManager.currentFile) kotlin.test.assertNotNull<Any>(fileManager.currentFile)
@ -49,8 +49,8 @@ class ExitCommandTest : VimTestCase() {
setupChecks { setupChecks {
neoVim.exitOnTearDown = false neoVim.exitOnTearDown = false
} }
val psiFile1 = fixture.configureByText("A_Discovery1", "I found it in a legendary land") val psiFile1 = fixture.configureByText("A_Discovery1", "Lorem ipsum dolor sit amet,")
val psiFile2 = fixture.configureByText("A_Discovery2", "all rocks and lavender and tufted grass,") val psiFile2 = fixture.configureByText("A_Discovery2", "consectetur adipiscing elit")
fileManager.openFile(psiFile1.virtualFile, false) fileManager.openFile(psiFile1.virtualFile, false)
fileManager.openFile(psiFile2.virtualFile, false) fileManager.openFile(psiFile2.virtualFile, false)
kotlin.test.assertNotNull<Any>(fileManager.currentFile) kotlin.test.assertNotNull<Any>(fileManager.currentFile)

View File

@ -21,19 +21,19 @@ class JoinLinesCommandTest : VimTestCase() {
doTest( doTest(
exCommand("j"), exCommand("j"),
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land$c all rocks and lavender and tufted grass, Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -46,19 +46,19 @@ class JoinLinesCommandTest : VimTestCase() {
doTest( doTest(
exCommand("join"), exCommand("join"),
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land$c all rocks and lavender and tufted grass, Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -71,18 +71,18 @@ class JoinLinesCommandTest : VimTestCase() {
doTest( doTest(
exCommand("4,6j"), exCommand("4,6j"),
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, where it was settled on some sodden sand$c hard by the torrent of a mountain pass. consectetur adipiscing elit Sed in orci mauris.$c Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -93,22 +93,22 @@ class JoinLinesCommandTest : VimTestCase() {
fun `test join multicaret`() { fun `test join multicaret`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
typeText(injector.parser.parseKeys("Vjj")) typeText(injector.parser.parseKeys("Vjj"))
typeText(commandToKeys("join")) typeText(commandToKeys("join"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I found it in a legendary land all rocks and lavender and tufted grass,$c where it was settled on some sodden sand Lorem ipsum dolor sit amet, consectetur adipiscing elit$c Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -20,12 +20,12 @@ class MapClearCommandTest : VimTestCase() {
super.setUp(testInfo) super.setUp(testInfo)
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -21,10 +21,10 @@ class MarkCommandTest : VimTestCase() {
@Test @Test
fun `test simple mark`() { fun `test simple mark`() {
configureByText( configureByText(
"""I found it in a legendary land """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it$c was settled on some sodden sand |where it$c was settled on some sodden sand
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(commandToKeys("mark a")) typeText(commandToKeys("mark a"))
@ -38,10 +38,10 @@ class MarkCommandTest : VimTestCase() {
@Test @Test
fun `test global mark`() { fun `test global mark`() {
configureByText( configureByText(
"""I found it in a legendary land """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it$c was settled on some sodden sand |where it$c was settled on some sodden sand
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(commandToKeys("mark G")) typeText(commandToKeys("mark G"))
@ -55,10 +55,10 @@ class MarkCommandTest : VimTestCase() {
@Test @Test
fun `test k mark`() { fun `test k mark`() {
configureByText( configureByText(
"""I found it in a legendary land """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it$c was settled on some sodden sand |where it$c was settled on some sodden sand
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(commandToKeys("k a")) typeText(commandToKeys("k a"))
@ -72,10 +72,10 @@ class MarkCommandTest : VimTestCase() {
@Test @Test
fun `test mark in range`() { fun `test mark in range`() {
configureByText( configureByText(
"""I found it in a legendary land """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it$c was settled on some sodden sand |where it$c was settled on some sodden sand
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(commandToKeys("1,2 mark a")) typeText(commandToKeys("1,2 mark a"))

View File

@ -91,10 +91,10 @@ class MarksCommandTest : VimTestCase() {
@Test @Test
fun `test line number is 1-based and column is 0-based`() { fun `test line number is 1-based and column is 0-based`() {
configureByText( configureByText(
"""${c}I found it in a legendary land """${c}Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(injector.parser.parseKeys("ma")) typeText(injector.parser.parseKeys("ma"))
@ -102,7 +102,7 @@ class MarksCommandTest : VimTestCase() {
enterCommand("marks") enterCommand("marks")
assertExOutput( assertExOutput(
"""mark line col file/text """mark line col file/text
| a 1 0 I found it in a legendary land | a 1 0 Lorem ipsum dolor sit amet,
""".trimMargin(), """.trimMargin(),
) )
} }
@ -157,9 +157,9 @@ class MarksCommandTest : VimTestCase() {
fun `test argument filters output`() { fun `test argument filters output`() {
configureByText( configureByText(
"""I found ${c}it in a legendary land """I found ${c}it in a legendary land
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(injector.parser.parseKeys("ma" + "jl")) typeText(injector.parser.parseKeys("ma" + "jl"))
@ -170,8 +170,8 @@ class MarksCommandTest : VimTestCase() {
enterCommand("marks bdD") enterCommand("marks bdD")
assertExOutput( assertExOutput(
"""mark line col file/text """mark line col file/text
| b 2 9 all rocks and lavender and tufted grass, | b 2 9 consectetur adipiscing elit
| D 4 11 hard by the torrent of a mountain pass. | D 4 11 Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
} }
@ -180,9 +180,9 @@ class MarksCommandTest : VimTestCase() {
fun `test list nothing if no marks match`() { fun `test list nothing if no marks match`() {
configureByText( configureByText(
"""I found ${c}it in a legendary land """I found ${c}it in a legendary land
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
typeText(injector.parser.parseKeys("ma" + "jl")) typeText(injector.parser.parseKeys("ma" + "jl"))
@ -194,9 +194,9 @@ class MarksCommandTest : VimTestCase() {
fun `test correctly handles invalid mark location`() { fun `test correctly handles invalid mark location`() {
configureByText( configureByText(
"""I found ${c}it in a legendary land """I found ${c}it in a legendary land
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
val vimEditor = fixture.editor.vim val vimEditor = fixture.editor.vim
@ -204,7 +204,7 @@ class MarksCommandTest : VimTestCase() {
enterCommand("marks") enterCommand("marks")
assertExOutput( assertExOutput(
"""mark line col file/text """mark line col file/text
| a 4 39 hard by the torrent of a mountain pass. | a 4 39 Cras id tellus in ex imperdiet egestas.
""".trimMargin(), """.trimMargin(),
) )
} }

View File

@ -16,14 +16,14 @@ class PrintCommandTest : VimTestCase() {
fun `test default range`() { fun `test default range`() {
configureByText(initialText) configureByText(initialText)
typeText(commandToKeys("p")) typeText(commandToKeys("p"))
assertExOutput("A Discovery\n") assertExOutput("Lorem Ipsum\n")
} }
@Test @Test
fun `test default range with P`() { fun `test default range with P`() {
configureByText(initialText) configureByText(initialText)
typeText(commandToKeys("P")) typeText(commandToKeys("P"))
assertExOutput("A Discovery\n") assertExOutput("Lorem Ipsum\n")
} }
@Test @Test
@ -39,9 +39,9 @@ class PrintCommandTest : VimTestCase() {
typeText(commandToKeys("p 3")) typeText(commandToKeys("p 3"))
assertExOutput( assertExOutput(
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
""".trimIndent(), """.trimIndent(),
) )
@ -49,12 +49,12 @@ class PrintCommandTest : VimTestCase() {
companion object { companion object {
private val initialText = """ private val initialText = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
} }
} }

View File

@ -20,19 +20,19 @@ class ShiftLeftCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
@Test @Test
fun `test simple left shift`() { fun `test simple left shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys("<")) typeText(commandToKeys("<"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }
@ -40,19 +40,19 @@ class ShiftLeftCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
@Test @Test
fun `test double left shift`() { fun `test double left shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys("<<")) typeText(commandToKeys("<<"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }
@ -60,19 +60,19 @@ class ShiftLeftCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
@Test @Test
fun `test left shift no space`() { fun `test left shift no space`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys("<")) typeText(commandToKeys("<"))
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }
@ -80,19 +80,19 @@ class ShiftLeftCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
@Test @Test
fun `test range left shift`() { fun `test range left shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys("3,4<")) typeText(commandToKeys("3,4<"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| ${c}where it was settled on some sodden sand | ${c}Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }

View File

@ -20,19 +20,19 @@ class ShiftRightCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
@Test @Test
fun `test simple right shift`() { fun `test simple right shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys(">")) typeText(commandToKeys(">"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }
@ -40,19 +40,19 @@ class ShiftRightCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
@Test @Test
fun `test double right shift`() { fun `test double right shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys(">>")) typeText(commandToKeys(">>"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }
@ -60,19 +60,19 @@ class ShiftRightCommandTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues") @TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
@Test @Test
fun `test range right shift`() { fun `test range right shift`() {
val before = """ I found it in a legendary land val before = """ Lorem ipsum dolor sit amet,
| ${c}all rocks and lavender and tufted grass, | ${c}consectetur adipiscing elit
| where it was settled on some sodden sand | Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
configureByJavaText(before) configureByJavaText(before)
typeText(commandToKeys("3,4>")) typeText(commandToKeys("3,4>"))
val after = """ I found it in a legendary land val after = """ Lorem ipsum dolor sit amet,
| all rocks and lavender and tufted grass, | consectetur adipiscing elit
| ${c}where it was settled on some sodden sand | ${c}Sed in orci mauris.
| hard by the torrent of a mountain pass. | Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
assertState(after) assertState(after)
} }

View File

@ -20,12 +20,12 @@ class UnMapCommandTest : VimTestCase() {
super.setUp(testInfo) super.setUp(testInfo)
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
} }

View File

@ -17,19 +17,19 @@ class YankLinesCommandTest : VimTestCase() {
fun `test copy with range`() { fun `test copy with range`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
h h
""".trimIndent(), """.trimIndent(),
) )
typeText(commandToKeys("3,4y")) typeText(commandToKeys("3,4y"))
val yanked = VimPlugin.getRegister().lastRegister!!.text val yanked = VimPlugin.getRegister().lastRegister!!.text
kotlin.test.assertEquals( kotlin.test.assertEquals(
"""|I found it in a legendary land """|Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
| |
""".trimMargin(), """.trimMargin(),
yanked, yanked,
@ -40,11 +40,11 @@ class YankLinesCommandTest : VimTestCase() {
fun `test copy with one char on the last line`() { fun `test copy with one char on the last line`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
h h
""".trimIndent(), """.trimIndent(),
) )
@ -52,11 +52,11 @@ class YankLinesCommandTest : VimTestCase() {
val yanked = VimPlugin.getRegister().lastRegister!!.text val yanked = VimPlugin.getRegister().lastRegister!!.text
kotlin.test.assertEquals( kotlin.test.assertEquals(
""" """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
h h
""".trimIndent(), """.trimIndent(),

View File

@ -100,18 +100,18 @@ class OpMappingTest : VimTestCase() {
doTest( doTest(
"dO", "dO",
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.COMMAND, VimStateMachine.Mode.COMMAND,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -578,17 +578,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection`() { fun `test adding multicaret after linewise selection`() {
val before = """ val before = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vjj<A-n>", before, after) doTest("Vjj<A-n>", before, after)
} }
@ -596,16 +596,16 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection till the last line`() { fun `test adding multicaret after linewise selection till the last line`() {
val before = """ val before = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vjjj<A-n>", before, after) doTest("Vjjj<A-n>", before, after)
} }
@ -613,17 +613,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection moving up`() { fun `test adding multicaret after linewise selection moving up`() {
val before = """ val before = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vkk<A-n>", before, after) doTest("Vkk<A-n>", before, after)
} }
@ -631,17 +631,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection moving up from down`() { fun `test adding multicaret after linewise selection moving up from down`() {
val before = """ val before = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
I found it in a legendary land Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vkk<A-n>", before, after) doTest("Vkk<A-n>", before, after)
} }
@ -649,23 +649,23 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection moving up to empty lines`() { fun `test adding multicaret after linewise selection moving up to empty lines`() {
val before = """ val before = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
$c $c
$c $c
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
${c}hard by the torrent of a mountain pass. ${c}Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vkkk<A-n>", before, after) doTest("Vkkk<A-n>", before, after)
} }
@ -673,23 +673,23 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
@Test @Test
fun `test adding multicaret after linewise selection moving down to empty lines`() { fun `test adding multicaret after linewise selection moving down to empty lines`() {
val before = """ val before = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
val after = """ val after = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
${c}all rocks and lavender and tufted grass, ${c}consectetur adipiscing elit
$c $c
$c $c
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
doTest("Vjjj<A-n>", before, after) doTest("Vjjj<A-n>", before, after)
} }

View File

@ -24,102 +24,102 @@ class ParagraphMotionTest : VimTestCase() {
@Test @Test
fun `test paragraph next without whitespace`() { fun `test paragraph next without whitespace`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
| |
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|$c |$c
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@Test @Test
fun `test paragraph next with whitespace`() { fun `test paragraph next with whitespace`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|.... |....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|$c.... |$c....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@Test @Test
fun `test paragraph next with whitespace visual`() { fun `test paragraph next with whitespace visual`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|.... |....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|${s}all rocks and lavender and tufted grass, |${s}consectetur adipiscing elit
|$c.$se... |$c.$se...
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
doTest("v}", before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER) doTest("v}", before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER)
} }
@Test @Test
fun `test paragraph next with whitespace delete`() { fun `test paragraph next with whitespace delete`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|${c}all rocks and lavender and tufted grass, |${c}consectetur adipiscing elit
|.... |....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|$c |$c
|.... |....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
doTest("d}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("d}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@Test @Test
fun `test paragraph prev without whitespace`() { fun `test paragraph prev without whitespace`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
| |
|${c}where it was settled on some sodden sand |${c}Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|$c |$c
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin() """.trimMargin()
doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@Test @Test
fun `test paragraph prev with whitespace`() { fun `test paragraph prev with whitespace`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|.... |....
|${c}where it was settled on some sodden sand |${c}Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|$c.... |$c....
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }
@ -143,17 +143,17 @@ class ParagraphMotionTest : VimTestCase() {
@Test @Test
fun `test paragraph prev with whitespace delete`() { fun `test paragraph prev with whitespace delete`() {
val before = """I found it in a legendary land val before = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|.... |....
|${c}where it was settled on some sodden sand |${c}Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
val after = """I found it in a legendary land val after = """Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
|$c |$c
|where it was settled on some sodden sand |Sed in orci mauris.
|hard by the torrent of a mountain pass. |Cras id tellus in ex imperdiet egestas.
""".trimMargin().dotToSpace() """.trimMargin().dotToSpace()
doTest("d{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE) doTest("d{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
} }

View File

@ -205,9 +205,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
fun `test line replace`() { fun `test line replace`() {
val text = """ val text = """
I found it in ${c}a legendary land I found it in ${c}a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
@ -218,9 +218,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
assertState( assertState(
""" """
${c}legendary ${c}legendary
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text) kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text)
@ -338,10 +338,10 @@ class ReplaceWithRegisterTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
""" """
I found it in a legendary land Lorem ipsum dolor sit amet,
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
where it was settled on some sodden sand Sed in orci mauris.
${c}where it was settled on some sodden sand ${c}Sed in orci mauris.
""", """,
) )
@Test @Test
@ -372,9 +372,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
fun `test visual replace`() { fun `test visual replace`() {
val text = """ val text = """
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
@ -385,9 +385,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
assertState( assertState(
""" """
I legendar${c}y it in a legendary land I legendar${c}y it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text) kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text)
@ -443,9 +443,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
fun `test visual line replace`() { fun `test visual line replace`() {
val text = """ val text = """
I fo${c}und it in a legendary land I fo${c}und it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
configureByText(text) configureByText(text)
@ -456,9 +456,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
assertState( assertState(
""" """
${c}legendary ${c}legendary
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)

View File

@ -37,12 +37,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection no selection`() { fun `test enable character selection no selection`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I $s$c${se}found it in a legendary land I $s$c${se}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -57,12 +57,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection cursor in the middle`() { fun `test enable character selection cursor in the middle`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found$c it$se in a legendary land I ${s}found$c it$se in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -75,12 +75,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I ${s}found ${c}i${se}t in a legendary land I ${s}found ${c}i${se}t in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -90,12 +90,12 @@ class IdeaVisualControlTest : VimTestCase() {
@VimBehaviorDiffers( @VimBehaviorDiffers(
originalVimAfter = """ originalVimAfter = """
A Discovery Lorem Ipsum
I ${s}found i${c}t$se in a legendary land I ${s}found i${c}t$se in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""", """,
) )
@OptionTest(VimOption(OptionConstants.selectmode, doesntAffectTest = true)) @OptionTest(VimOption(OptionConstants.selectmode, doesntAffectTest = true))
@ -103,12 +103,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection cursor on end`() { fun `test enable character selection cursor on end`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found it$c$se in a legendary land I ${s}found it$c$se in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -121,12 +121,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I ${s}found it ${c}i${se}n a legendary land I ${s}found it ${c}i${se}n a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -139,12 +139,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection cursor on start`() { fun `test enable character selection cursor on start`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I $s${c}found it$se in a legendary land I $s${c}found it$se in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -157,12 +157,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I f${s}${c}ound it$se in a legendary land I f${s}${c}ound it$se in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -175,12 +175,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection lineend`() { fun `test enable character selection lineend`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found ${c}it in a legendary land$se I ${s}found ${c}it in a legendary land$se
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -193,12 +193,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I ${s}found i${c}t${se} in a legendary land I ${s}found i${c}t${se} in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -211,12 +211,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection next line`() { fun `test enable character selection next line`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found ${c}it in a legendary land I ${s}found ${c}it in a legendary land
${se}all rocks and lavender and tufted grass, ${se}consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -229,12 +229,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I ${s}found i${c}t${se} in a legendary land I ${s}found i${c}t${se} in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -247,12 +247,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection start on line start`() { fun `test enable character selection start on line start`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
${s}I found ${c}it ${se}in a legendary land ${s}I found ${c}it ${se}in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -265,12 +265,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
${s}I found i${c}t${se} in a legendary land ${s}I found i${c}t${se} in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -283,12 +283,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection start on line end`() { fun `test enable character selection start on line end`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
$s $s
I found ${c}it ${se}in a legendary land I found ${c}it ${se}in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -301,12 +301,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
$s $s
I found i${c}t${se} in a legendary land I found i${c}t${se} in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -319,7 +319,7 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection multicaret`() { fun `test enable character selection multicaret`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
$s $s
I found ${c}it ${se}in a legendary land I found ${c}it ${se}in a legendary land
all rocks $s$c${se}and lavender and tufted grass, all rocks $s$c${se}and lavender and tufted grass,
@ -337,7 +337,7 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
$s $s
I found i${c}t${se} in a legendary land I found i${c}t${se} in a legendary land
all rocks ${s}a${c}n${se}d lavender and tufted grass, all rocks ${s}a${c}n${se}d lavender and tufted grass,
@ -586,7 +586,7 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection looks like block`() { fun `test enable character selection looks like block`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found$c$se it in a legendary land I ${s}found$c$se it in a legendary land
al${s}l roc$c${se}ks and lavender and tufted grass, al${s}l roc$c${se}ks and lavender and tufted grass,
@ -607,12 +607,12 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test enable character selection`() { fun `test enable character selection`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${s}found$c$se it in a legendary land I ${s}found$c$se it in a legendary land
al${s}l roc$c${se}ks and lavender and tufted grass, al${s}l roc$c${se}ks and lavender and tufted grass,
wh${s}ere i$c${se}t was settled on some sodden sand wh${s}ere i$c${se}t was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.COMMAND) assertMode(VimStateMachine.Mode.COMMAND)
@ -625,12 +625,12 @@ class IdeaVisualControlTest : VimTestCase() {
typeText(injector.parser.parseKeys("l")) typeText(injector.parser.parseKeys("l"))
assertState( assertState(
""" """
A Discovery Lorem Ipsum
I ${s}found ${c}i${se}t in a legendary land I ${s}found ${c}i${se}t in a legendary land
al${s}l rock${c}s${se} and lavender and tufted grass, al${s}l rock${c}s${se} and lavender and tufted grass,
wh${s}ere it${c} ${se}was settled on some sodden sand wh${s}ere it${c} ${se}was settled on some sodden sand
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.VISUAL) assertMode(VimStateMachine.Mode.VISUAL)
@ -715,10 +715,10 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test control selection`() { fun `test control selection`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
VimListenerManager.EditorListeners.addAll() VimListenerManager.EditorListeners.addAll()
@ -734,10 +734,10 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test control selection to visual mode`() { fun `test control selection to visual mode`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
VimListenerManager.EditorListeners.addAll() VimListenerManager.EditorListeners.addAll()
@ -753,10 +753,10 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test control selection from line to char visual modes`() { fun `test control selection from line to char visual modes`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )
typeText(injector.parser.parseKeys("V")) typeText(injector.parser.parseKeys("V"))
@ -777,10 +777,10 @@ class IdeaVisualControlTest : VimTestCase() {
fun `test control selection from line to char visual modes in keep mode`() { fun `test control selection from line to char visual modes in keep mode`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
""".trimIndent(), """.trimIndent(),
) )

View File

@ -37,12 +37,12 @@ class NonVimVisualChangeTest : VimTestCase() {
// See https://github.com/JetBrains/ideavim/pull/186#issuecomment-486656093 // See https://github.com/JetBrains/ideavim/pull/186#issuecomment-486656093
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
VimListenerManager.EditorListeners.add(fixture.editor) VimListenerManager.EditorListeners.add(fixture.editor)
@ -55,12 +55,12 @@ class NonVimVisualChangeTest : VimTestCase() {
} }
assertState( assertState(
""" """
A Discovery Lorem Ipsum
found it in a legendary land found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
assertMode(VimStateMachine.Mode.INSERT) assertMode(VimStateMachine.Mode.INSERT)
@ -71,12 +71,12 @@ class NonVimVisualChangeTest : VimTestCase() {
fun `test enable and disable selection`() { fun `test enable and disable selection`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
VimListenerManager.EditorListeners.add(fixture.editor) VimListenerManager.EditorListeners.add(fixture.editor)
@ -95,12 +95,12 @@ class NonVimVisualChangeTest : VimTestCase() {
fun `test enable, disable, and enable selection again`() { fun `test enable, disable, and enable selection again`() {
configureByText( configureByText(
""" """
A Discovery Lorem Ipsum
I ${c}found it in a legendary land I ${c}found it in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
) )
VimListenerManager.EditorListeners.add(fixture.editor) VimListenerManager.EditorListeners.add(fixture.editor)

View File

@ -25,14 +25,14 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test default normal mode caret is block`() { fun `test default normal mode caret is block`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
} }
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test default insert mode caret is vertical bar`() { fun `test default insert mode caret is vertical bar`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("i") typeText("i")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
} }
@ -40,7 +40,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test insert mode caret is reset after Escape`() { fun `test insert mode caret is reset after Escape`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("i", "<Esc>") typeText("i", "<Esc>")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
} }
@ -48,7 +48,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test default replace mode caret is underscore`() { fun `test default replace mode caret is underscore`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("R") typeText("R")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.2F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.2F)
} }
@ -56,7 +56,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test default op pending caret is thick underscore`() { fun `test default op pending caret is thick underscore`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("d") typeText("d")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.5F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.5F)
} }
@ -64,7 +64,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test caret is reset after op pending`() { fun `test caret is reset after op pending`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("d$") typeText("d$")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
} }
@ -72,7 +72,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test default visual mode caret is block`() { fun `test default visual mode caret is block`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("ve") typeText("ve")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
} }
@ -80,7 +80,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test visual block hides secondary carets`() { fun `test visual block hides secondary carets`() {
configureByLines(5, "I found it in a legendary land") configureByLines(5, "Lorem ipsum dolor sit amet,")
typeText("w", "<C-V>2j5l") typeText("w", "<C-V>2j5l")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
fixture.editor.caretModel.allCarets.forEach { fixture.editor.caretModel.allCarets.forEach {
@ -95,7 +95,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@Test @Test
fun `test select mode uses insert mode caret`() { fun `test select mode uses insert mode caret`() {
// Vim doesn't have a different caret for SELECT, and doesn't have an option in guicursor to change SELECT mode // Vim doesn't have a different caret for SELECT, and doesn't have an option in guicursor to change SELECT mode
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("v7l", "<C-G>") typeText("v7l", "<C-G>")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
} }
@ -194,7 +194,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test changing guicursor option updates caret immediately`() { fun `test changing guicursor option updates caret immediately`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
enterCommand("set guicursor=n:hor22") enterCommand("set guicursor=n:hor22")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.22F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.22F)
} }
@ -202,7 +202,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test changing guicursor option invalidates caches correctly`() { fun `test changing guicursor option invalidates caches correctly`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("i") typeText("i")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
typeText("<Esc>") typeText("<Esc>")
@ -214,7 +214,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test caret uses last matching guicursor option`() { fun `test caret uses last matching guicursor option`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
// This will give us three matching options for INSERT // This will give us three matching options for INSERT
enterCommand("set guicursor+=i:ver25") enterCommand("set guicursor+=i:ver25")
enterCommand("set guicursor+=i:hor75") enterCommand("set guicursor+=i:hor75")
@ -225,7 +225,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test block used when caret shape is unspecified`() { fun `test block used when caret shape is unspecified`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
enterCommand("set guicursor=c:ver25") enterCommand("set guicursor=c:ver25")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0.0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0.0F)
typeText("i") typeText("i")
@ -235,7 +235,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test 'all' guicursor option`() { fun `test 'all' guicursor option`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
enterCommand("set guicursor+=a:ver25") enterCommand("set guicursor+=a:ver25")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
} }
@ -243,7 +243,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test 'all' guicursor option without cursor shape does not affect existing shapes`() { fun `test 'all' guicursor option without cursor shape does not affect existing shapes`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
enterCommand("set guicursor+=a:blinkwait200-blinkoff125-blinkon150-Cursor/lCursor") enterCommand("set guicursor+=a:blinkwait200-blinkoff125-blinkon150-Cursor/lCursor")
typeText("i") typeText("i")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
@ -252,7 +252,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test 'all' guicursor option can be overridden`() { fun `test 'all' guicursor option can be overridden`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
// A specific entry added after "all" takes precedence // A specific entry added after "all" takes precedence
enterCommand("set guicursor+=a:ver25") enterCommand("set guicursor+=a:ver25")
enterCommand("set guicursor+=i:hor75") enterCommand("set guicursor+=i:hor75")
@ -266,7 +266,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
val originalValue = EditorSettingsExternalizable.getInstance().isBlockCursor val originalValue = EditorSettingsExternalizable.getInstance().isBlockCursor
EditorSettingsExternalizable.getInstance().isBlockCursor = true EditorSettingsExternalizable.getInstance().isBlockCursor = true
try { try {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("i") typeText("i")
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 1.0F) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 1.0F)
} finally { } finally {
@ -277,7 +277,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test reset caret shape when disable plugin`() { fun `test reset caret shape when disable plugin`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("i") typeText("i")
VimPlugin.setEnabled(false) VimPlugin.setEnabled(false)
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f) assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
@ -286,7 +286,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test reset caret shape when disable plugin 2`() { fun `test reset caret shape when disable plugin 2`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("v2e") typeText("v2e")
VimPlugin.setEnabled(false) VimPlugin.setEnabled(false)
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f) assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
@ -295,7 +295,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test reset caret shape when disable plugin 3`() { fun `test reset caret shape when disable plugin 3`() {
configureByText("I found it in a legendary land") configureByText("Lorem ipsum dolor sit amet,")
typeText("r") typeText("r")
VimPlugin.setEnabled(false) VimPlugin.setEnabled(false)
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f) assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
@ -304,7 +304,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING) @TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
@Test @Test
fun `test adding new caret via IJ`() { fun `test adding new caret via IJ`() {
configureByText("${c}I found it in a legendary land") configureByText("${c}Lorem ipsum dolor sit amet,")
fixture.editor.caretModel.addCaret(VisualPosition(0, 5)) fixture.editor.caretModel.addCaret(VisualPosition(0, 5))
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0f) assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0f)
} }
@ -314,8 +314,8 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
fun `test adding new caret below`() { fun `test adding new caret below`() {
configureByText( configureByText(
""" """
|${c}I found it in a legendary land |${c}Lorem ipsum dolor sit amet,
|all rocks and lavender and tufted grass, |consectetur adipiscing elit
""".trimMargin(), """.trimMargin(),
) )
injector.actionExecutor.executeAction( injector.actionExecutor.executeAction(

View File

@ -25,20 +25,20 @@ class DigraphTest : VimTestCase() {
doTest( doTest(
"i B<BS>B", "i B<BS>B",
""" """
A Discovery Lorem Ipsum
I found it$c in a legendary land I found it$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it ¦$c in a legendary land I found it ¦$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -53,20 +53,20 @@ class DigraphTest : VimTestCase() {
doTest( doTest(
"i B<BS>BHello", "i B<BS>BHello",
""" """
A Discovery Lorem Ipsum
I found it$c in a legendary land I found it$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it ¦Hello$c in a legendary land I found it ¦Hello$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -81,20 +81,20 @@ class DigraphTest : VimTestCase() {
doTest( doTest(
"i B<BS><BS>B", "i B<BS><BS>B",
""" """
A Discovery Lorem Ipsum
I found it$c in a legendary land I found it$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found itB$c in a legendary land I found itB$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,
@ -109,20 +109,20 @@ class DigraphTest : VimTestCase() {
doTest( doTest(
"i B<BS>B<BS>B", "i B<BS>B<BS>B",
""" """
A Discovery Lorem Ipsum
I found it$c in a legendary land I found it$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
""" """
A Discovery Lorem Ipsum
I found it B$c in a legendary land I found it B$c in a legendary land
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent(), """.trimIndent(),
VimStateMachine.Mode.INSERT, VimStateMachine.Mode.INSERT,
VimStateMachine.SubMode.NONE, VimStateMachine.SubMode.NONE,

View File

@ -79,10 +79,10 @@ class RandomActionsPropertyTest : VimPropertyTestBase() {
companion object { companion object {
private val text = """ private val text = """
${c}I found it in a legendary land ${c}Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()
} }
} }

View File

@ -9,7 +9,7 @@
package org.jetbrains.plugins.ideavim.propertybased.samples package org.jetbrains.plugins.ideavim.propertybased.samples
internal val loremText = """ internal val loremText = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida commodo orci, egestas placerat purus rhoncus non. Donec efficitur placerat lorem, non ullamcorper nisl. Aliquam vestibulum, purus a pretium sodales, lorem libero placerat tortor, ut gravida est arcu nec purus. Suspendisse luctus euismod mi, at consectetur sapien facilisis sed. Duis eu magna id nisi lacinia vehicula in quis mauris. Donec tincidunt, erat in euismod placerat, tortor eros efficitur ligula, non finibus metus enim in ex. Nam commodo libero quis vestibulum congue. Vivamus sit amet tincidunt orci, in luctus tortor. Ut aliquam porttitor pharetra. Sed vel mi lacinia, auctor eros vel, condimentum eros. Fusce suscipit auctor venenatis. Aliquam elit risus, eleifend quis mollis eu, venenatis quis ex. Nunc varius consectetur eros sit amet efficitur. Donec a elit rutrum, tristique est in, maximus sem. Donec eleifend magna vitae suscipit viverra. Phasellus luctus aliquam tellus viverra consequat. Lorem Ipsumm dolor sit amet, consectetur adipiscing elit. Morbi gravida commodo orci, egestas placerat purus rhoncus non. Donec efficitur placerat lorem, non ullamcorper nisl. Aliquam vestibulum, purus a pretium sodales, lorem libero placerat tortor, ut gravida est arcu nec purus. Suspendisse luctus euismod mi, at consectetur sapien facilisis sed. Duis eu magna id nisi lacinia vehicula in quis mauris. Donec tincidunt, erat in euismod placerat, tortor eros efficitur ligula, non finibus metus enim in ex. Nam commodo libero quis vestibulum congue. Vivamus sit amet tincidunt orci, in luctus tortor. Ut aliquam porttitor pharetra. Sed vel mi lacinia, auctor eros vel, condimentum eros. Fusce suscipit auctor venenatis. Aliquam elit risus, eleifend quis mollis eu, venenatis quis ex. Nunc varius consectetur eros sit amet efficitur. Donec a elit rutrum, tristique est in, maximus sem. Donec eleifend magna vitae suscipit viverra. Phasellus luctus aliquam tellus viverra consequat.
Aliquam tristique eros vel magna dictum tincidunt. Duis sagittis mi et bibendum congue. Donec sollicitudin, ipsum quis pellentesque efficitur, metus quam congue nulla, vel rutrum neque lectus vitae sem. In accumsan scelerisque risus, ac sollicitudin purus ornare in. Proin leo erat, tempus vitae purus nec, lobortis bibendum tortor. Aenean mauris sem, interdum id facilisis et, ullamcorper ut libero. Quisque magna ligula, euismod sit amet ipsum non, maximus ultrices nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras facilisis arcu vitae orci scelerisque, vel dignissim massa dapibus. Fusce sed urna ut orci pellentesque consectetur. Maecenas rutrum erat ac libero elementum dictum. Donec pulvinar, sem feugiat suscipit mattis, turpis tellus consectetur dui, vitae vehicula dolor purus eu lectus. Nullam lorem ligula, aliquet id eros sed, rhoncus consequat neque. Cras eget erat non nunc convallis accumsan id in ipsum. Aliquam tristique eros vel magna dictum tincidunt. Duis sagittis mi et bibendum congue. Donec sollicitudin, ipsum quis pellentesque efficitur, metus quam congue nulla, vel rutrum neque lectus vitae sem. In accumsan scelerisque risus, ac sollicitudin purus ornare in. Proin leo erat, tempus vitae purus nec, lobortis bibendum tortor. Aenean mauris sem, interdum id facilisis et, ullamcorper ut libero. Quisque magna ligula, euismod sit amet ipsum non, maximus ultrices nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras facilisis arcu vitae orci scelerisque, vel dignissim massa dapibus. Fusce sed urna ut orci pellentesque consectetur. Maecenas rutrum erat ac libero elementum dictum. Donec pulvinar, sem feugiat suscipit mattis, turpis tellus consectetur dui, vitae vehicula dolor purus eu lectus. Nullam lorem ligula, aliquet id eros sed, rhoncus consequat neque. Cras eget erat non nunc convallis accumsan id in ipsum.

View File

@ -9,10 +9,10 @@
package org.jetbrains.plugins.ideavim.propertybased.samples package org.jetbrains.plugins.ideavim.propertybased.samples
internal val simpleText = """ internal val simpleText = """
A Discovery Lorem Ipsum
I found it in a legendary land Lorem ipsum dolor sit amet,
all rocks and lavender and tufted grass, consectetur adipiscing elit
where it was settled on some sodden sand Sed in orci mauris.
hard by the torrent of a mountain pass. Cras id tellus in ex imperdiet egestas.
""".trimIndent() """.trimIndent()

View File

@ -25,7 +25,7 @@ class ShowCmdTest : VimTestCase() {
@BeforeEach @BeforeEach
override fun setUp(testInfo: TestInfo) { override fun setUp(testInfo: TestInfo) {
super.setUp(testInfo) super.setUp(testInfo)
val before = "${c}I found it in a legendary land" val before = "${c}Lorem ipsum dolor sit amet,"
configureByText(before) configureByText(before)
} }