mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-02-23 23:46:03 +01:00
Use Lorem Ipsum for tests
This commit is contained in:
parent
ff907893d0
commit
03bd4bbeed
CONTRIBUTING.md
src/test/java/org/jetbrains/plugins/ideavim
VimTestCase.kt
action
ChangeActionTest.ktFileGetLocationInfoActionTest.ktMacroActionTest.ktResetModeActionTest.kt
change
RepeatChangeActionTest.ktUndoActionTest.kt
change
delete
DeleteCharacterLeftActionTest.ktDeleteCharacterRightActionTest.ktDeleteEndOfLineActionTest.ktDeleteJoinLinesSpacesActionTest.ktDeleteJoinVisualLinesSpacesActionTest.ktDeleteMotionActionTest.ktDeleteVisualActionTest.ktDeleteVisualLinesActionTest.ktDeleteVisualLinesEndActionTest.kt
insert
copy
motion
leftright
MotionArrowLeftActionTest.ktMotionArrowRightActionTest.ktMotionEndActionTest.ktMotionRightActionTest.kt
mark
object
select
text
updown
visual
scroll
ScrollFirstScreenLineActionTest.ktScrollFirstScreenLinePageStartActionTest.ktScrollFirstScreenLineStartActionTest.ktScrollHalfPageDownActionTest.ktScrollHalfPageUpActionTest.ktScrollLastScreenLineActionTest.ktScrollLastScreenLinePageStartActionTest.ktScrollLastScreenLineStartActionTest.ktScrollLineDownActionTest.ktScrollLineUpActionTest.ktScrollMiddleScreenLineActionTest.ktScrollMiddleScreenLineStartActionTest.ktScrollPageDownActionTest.ktScrollPageUpActionTest.kt
ex/implementation/commands
BufferCloseCommandTest.ktDeleteMarksCommandTest.ktExitCommandTest.ktJoinLinesCommandTest.ktMapClearCommandTest.ktMarkCommandTest.ktMarksCommandTest.ktPrintCommandTest.ktShiftLeftCommandTest.ktShiftRightCommandTest.ktUnMapCommandTest.ktYankLinesCommandTest.kt
extension
group/visual
helper
option
propertybased
ui
@ -87,9 +87,16 @@ Here are some guides for testing:
|
||||
|
||||
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
|
||||
text that is easy to read and understand what is wrong if the test fails. For example, take a few lines from your
|
||||
favorite poem, or use Vladimir Nabokov’s “A Discovery" if you don't have one.
|
||||
2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd", "123 123 123 123", etc. Use a few lines of code or
|
||||
the following template:
|
||||
```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
|
||||
carets, dollar motion, etc.
|
||||
|
@ -274,7 +274,7 @@ abstract class VimTestCase {
|
||||
protected fun configureByPages(pageCount: Int) {
|
||||
val stringBuilder = StringBuilder()
|
||||
repeat(pageCount * screenHeight) {
|
||||
stringBuilder.appendLine("I found it in a legendary land")
|
||||
stringBuilder.appendLine("Lorem ipsum dolor sit amet,")
|
||||
}
|
||||
configureByText(stringBuilder.toString())
|
||||
}
|
||||
|
@ -1095,11 +1095,11 @@ and some text after""",
|
||||
"ld^j",
|
||||
"""
|
||||
lorem ${c}ipsum dolor sit amet
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
psum dolor sit amet
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -1112,11 +1112,11 @@ and some text after""",
|
||||
"ldbj",
|
||||
"""
|
||||
lorem$c ipsum dolor sit amet
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
ipsum dolor sit amet
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -1129,11 +1129,11 @@ and some text after""",
|
||||
"lcb<Esc>j",
|
||||
"""
|
||||
lorem$c ipsum dolor sit amet
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
ipsum dolor sit amet
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -1146,11 +1146,11 @@ and some text after""",
|
||||
"lc^<Esc>j",
|
||||
"""
|
||||
lorem$c ipsum dolor sit amet
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
ipsum dolor sit amet
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -1162,11 +1162,11 @@ and some text after""",
|
||||
doTest(
|
||||
"ld^k",
|
||||
"""
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
lorem ${c}ipsum dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
psum dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
@ -1179,11 +1179,11 @@ and some text after""",
|
||||
doTest(
|
||||
"lcb<Esc>k",
|
||||
"""
|
||||
lorem ipsum dolor sit amet
|
||||
Lorem Ipsumm dolor sit amet
|
||||
lorem$c ipsum dolor sit amet
|
||||
""".trimIndent(),
|
||||
"""
|
||||
${c}lorem ipsum dolor sit amet
|
||||
${c}Lorem Ipsumm dolor sit amet
|
||||
ipsum dolor sit amet
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
|
@ -20,16 +20,16 @@ class FileGetLocationInfoActionTest : VimTestCase() {
|
||||
fun `test get file info`() {
|
||||
val keys = injector.parser.parseKeys("g<C-G>")
|
||||
val before = """
|
||||
${c}A Discovery
|
||||
${c}Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
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")
|
||||
@ -37,17 +37,17 @@ class FileGetLocationInfoActionTest : VimTestCase() {
|
||||
fun `test get file info with empty line`() {
|
||||
val keys = injector.parser.parseKeys("g<C-G>")
|
||||
val before = """
|
||||
${c}A Discovery
|
||||
${c}Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
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")
|
||||
@ -55,17 +55,17 @@ class FileGetLocationInfoActionTest : VimTestCase() {
|
||||
fun `test get file info in the middle`() {
|
||||
val keys = injector.parser.parseKeys("g<C-G>")
|
||||
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,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
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")
|
||||
@ -73,16 +73,16 @@ class FileGetLocationInfoActionTest : VimTestCase() {
|
||||
fun `test get file info on the last line`() {
|
||||
val keys = injector.parser.parseKeys("g<C-G>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
$c
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
@ -56,17 +56,17 @@ class MacroActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test macro with search`() {
|
||||
val content = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
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 {
|
||||
startOffset == fixture.editor.caretModel.offset
|
||||
@ -76,12 +76,12 @@ class MacroActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test macro with command`() {
|
||||
val content = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(content)
|
||||
typeText(injector.parser.parseKeys("qa" + ":map x y<CR>" + "q"))
|
||||
@ -126,12 +126,12 @@ class MacroActionTest : VimTestCase() {
|
||||
// Broken, see the resulting text
|
||||
fun `ignore test macro with macro`() {
|
||||
val content = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(content)
|
||||
typeText(injector.parser.parseKeys("qa" + "l" + "q" + "qb" + "10@a" + "q" + "2@b"))
|
||||
@ -157,24 +157,24 @@ class MacroActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test stop on error`() {
|
||||
val content = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(content)
|
||||
typeText(injector.parser.parseKeys("qa" + "i1<esc>j" + "q" + "gg" + "10@a"))
|
||||
|
||||
assertState(
|
||||
"""
|
||||
1A Discovery
|
||||
1Lorem Ipsum
|
||||
1
|
||||
11I found it in a legendary land
|
||||
1all rocks and lavender and tufted grass,
|
||||
1where it was settled on some sodden sand
|
||||
${c}1hard by the torrent of a mountain pass.
|
||||
11Lorem ipsum dolor sit amet,
|
||||
1consectetur adipiscing elit
|
||||
1Sed in orci mauris.
|
||||
${c}1Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from normal mode`() {
|
||||
val keys = "<C-\\><C-N>"
|
||||
val before = "A Discovery"
|
||||
val after = "A Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -33,8 +33,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from insert mode`() {
|
||||
val keys = listOf("i", "<C-\\><C-N>")
|
||||
val before = "A Discovery"
|
||||
val after = "A Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -51,8 +51,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset and execute command`() {
|
||||
val keys = listOf("i", "<C-\\><C-N>", "3l")
|
||||
val before = "${c}A Discovery"
|
||||
val after = "A D${c}iscovery"
|
||||
val before = "${c}Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -60,8 +60,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from visual mode`() {
|
||||
val keys = listOf("V", "<C-\\><C-N>")
|
||||
val before = "A Discovery"
|
||||
val after = "A Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -69,8 +69,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from select mode`() {
|
||||
val keys = listOf("gH", "<C-\\><C-N>")
|
||||
val before = "A Discovery"
|
||||
val after = "A Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -78,8 +78,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from operator-pending mode`() {
|
||||
val keys = listOf("d", "<C-\\><C-N>")
|
||||
val before = "A Discovery"
|
||||
val after = "A Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -87,8 +87,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test reset from operator-pending mode with delete`() {
|
||||
val keys = "d<Esc>dw"
|
||||
val before = "A Discovery"
|
||||
val after = "Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -96,8 +96,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test delete command after resetting operator-pending mode`() {
|
||||
val keys = listOf("d", "<C-\\><C-N>", "dw")
|
||||
val before = "A Discovery"
|
||||
val after = "Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -105,8 +105,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test delete command after resetting operator-pending mode with esc`() {
|
||||
val keys = listOf("d", "<Esc>", "dw")
|
||||
val before = "A Discovery"
|
||||
val after = "Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -115,8 +115,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test delete command after resetting operator-pending mode with ctrl open bracket`() {
|
||||
val keys = listOf("d", "<C-[>", "dw")
|
||||
val before = "A Discovery"
|
||||
val after = "Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -134,8 +134,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
)
|
||||
|
||||
val keys = listOf("d", "<C-D>", "dw")
|
||||
val before = "A Discovery"
|
||||
val after = "Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
@ -143,8 +143,8 @@ class ResetModeActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test non-delete commands after resetting operator-pending mode`() {
|
||||
val keys = listOf("c", "<C-\\><C-N>", "another")
|
||||
val before = "A Discovery"
|
||||
val after = "Another Discovery"
|
||||
val before = "Lorem Ipsum"
|
||||
val after = "Lnotherorem Ipsum"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(fixture.editor.selectionModel.hasSelection())
|
||||
}
|
||||
|
@ -20,20 +20,20 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
fun `test simple repeat`() {
|
||||
val keys = listOf("v2erXj^", ".")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
XXXXXXXXXX in a legendary land
|
||||
${c}XXXXXXXXXXand lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
XXXXXXXXXXX dolor sit amet,
|
||||
${c}XXXXXXXXXXX adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -42,20 +42,20 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
fun `test simple repeat with dollar motion`() {
|
||||
val keys = listOf("v\$rXj^", ".")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
${c}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
${c}XXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -176,19 +176,19 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
fun `test line motion to end`() {
|
||||
val keys = listOf("VjrX2j^", ".")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
where it was settled on some sodden sand
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
Sed in orci mauris.
|
||||
${c}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
@ -199,20 +199,20 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
fun `test line motion shift`() {
|
||||
val keys = listOf("V3j<", ".")
|
||||
val before = """
|
||||
|A Discovery
|
||||
|Lorem Ipsum
|
||||
|
|
||||
| ${c}I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
| ${c}Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """
|
||||
|A Discovery
|
||||
|Lorem Ipsum
|
||||
|
|
||||
|${c}I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -242,7 +242,7 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
XXXXXnd it in a legendary land
|
||||
XXXXXocks and lavender and tufted grass,
|
||||
@ -302,20 +302,20 @@ class RepeatChangeActionTest : VimTestCase() {
|
||||
fun `test repeat with count`() {
|
||||
val keys = listOf("4x", "j", ".")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
und it in a legendary land
|
||||
${c}rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
m ipsum dolor sit amet,
|
||||
${c}ectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
@ -18,12 +18,12 @@ class UndoActionTest : VimTestCase() {
|
||||
fun `test simple undo`() {
|
||||
val keys = listOf("dw", "u")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = before
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
@ -35,12 +35,12 @@ class UndoActionTest : VimTestCase() {
|
||||
fun `undo after selection`() {
|
||||
val keys = listOf("v3eld", "u")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = before
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
@ -51,20 +51,20 @@ class UndoActionTest : VimTestCase() {
|
||||
fun `test undo with count`() {
|
||||
val keys = listOf("dwdwdw", "2u")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(hasSelection())
|
||||
@ -75,20 +75,20 @@ class UndoActionTest : VimTestCase() {
|
||||
if (!optionsNoEditor().isSet(IjOptionConstants.oldundo)) {
|
||||
val keys = listOf("a1<Esc>ea2<Esc>ea3<Esc>", "uu")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I1 found$c it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
kotlin.test.assertFalse(hasSelection())
|
||||
|
@ -34,11 +34,11 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"S",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
all ${c}rocks and lavender and tufted grass,
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
$c
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
@ -51,12 +51,12 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"S",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
all ${c}rocks and lavender and tufted grass,
|
||||
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
$c
|
||||
|
||||
""".trimIndent(),
|
||||
@ -70,11 +70,11 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"S",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
all ${c}rocks and lavender and tufted grass,
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
$c
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
@ -87,12 +87,12 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"S",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
all ${c}rocks and lavender and tufted grass,
|
||||
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
$c
|
||||
|
||||
""".trimIndent(),
|
||||
@ -107,11 +107,11 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
"S",
|
||||
"""
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
"""
|
||||
$c
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -123,12 +123,12 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"cc",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
all ${c}rocks and lavender and tufted grass,
|
||||
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
$c
|
||||
|
||||
""".trimIndent(),
|
||||
@ -142,13 +142,13 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"cc",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
$c
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
$c
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
@ -161,10 +161,10 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"3S",
|
||||
"""
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
The features it combines mark it as new
|
||||
to science: shape and shade -- the special tinge,
|
||||
@ -178,7 +178,7 @@ class ChangeLineActionTest : VimTestCase() {
|
||||
""".trimIndent(),
|
||||
"""
|
||||
$c
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
The features it combines mark it as new
|
||||
to science: shape and shade -- the special tinge,
|
||||
|
@ -21,19 +21,19 @@ class ChangeVisualActionTest : VimTestCase() {
|
||||
fun `test multiple line change`() {
|
||||
val keys = "VjcHello<esc>"
|
||||
val before = """
|
||||
${c}A Discovery
|
||||
${c}Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
Hello
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
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`() {
|
||||
val keys = "Vjc"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
originalVimAfter = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}
|
||||
""",
|
||||
@ -73,19 +73,19 @@ class ChangeVisualActionTest : VimTestCase() {
|
||||
fun `test multiple line change till the end`() {
|
||||
val keys = "Vjc"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
${c}
|
||||
|
||||
""".trimIndent()
|
||||
@ -96,21 +96,21 @@ class ChangeVisualActionTest : VimTestCase() {
|
||||
fun `test multiple line change till the end with two new lines`() {
|
||||
val keys = "Vjc"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}
|
||||
|
||||
@ -124,7 +124,7 @@ class ChangeVisualActionTest : VimTestCase() {
|
||||
fun `test change with dollar motion`() {
|
||||
val keys = listOf("<C-V>3j$", "c", "Hello<Esc>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |${c}found it in a legendary land
|
||||
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.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |Hello
|
||||
al|Hello
|
||||
@ -145,7 +145,7 @@ class ChangeVisualActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test replace first line`() {
|
||||
val keys = "VcHello<esc>"
|
||||
val before = "${c}A Discovery"
|
||||
val before = "${c}Lorem Ipsum"
|
||||
val after = "Hello"
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
@ -20,19 +20,19 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test change last line`() {
|
||||
val keys = "VC"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
@ -42,21 +42,21 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test last empty line`() {
|
||||
val keys = "vC"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
${c}
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
${c}
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
@ -64,11 +64,11 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
originalVimAfter = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}
|
||||
""",
|
||||
)
|
||||
@ -76,20 +76,20 @@ class ChangeVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test change last two lines`() {
|
||||
val keys = "vjC"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass${c}.
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}
|
||||
|
||||
""".trimIndent()
|
||||
|
@ -37,20 +37,20 @@ class DeleteCharacterLeftActionTest : VimTestCase() {
|
||||
fun `test deletes min of count and start of line`() {
|
||||
val keys = "25X"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found$c it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
$c it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
typeText(keys)
|
||||
|
@ -38,20 +38,20 @@ class DeleteCharacterRightActionTest : VimTestCase() {
|
||||
fun `test deletes min of count and end of line`() {
|
||||
val keys = injector.parser.parseKeys("20x")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary l${c}and
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary ${c}l
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
typeText(keys)
|
||||
|
@ -18,16 +18,16 @@ class DeleteEndOfLineActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"D",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$c
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$c
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -24,19 +24,19 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"J",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land$c all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -48,18 +48,18 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"3J",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".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
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit$c Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -72,20 +72,20 @@ class DeleteJoinLinesSpacesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"10J",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -25,19 +25,19 @@ class DeleteJoinVisualLinesSpacesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"VjJ",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -155,19 +155,19 @@ class DeleteMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test delete empty line`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val newFile = """
|
||||
A Discovery
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem Ipsum
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
typeTextInFile("dd", file)
|
||||
assertState(newFile)
|
||||
@ -178,17 +178,17 @@ class DeleteMotionActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"dd",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
${c}
|
||||
""".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
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
@ -198,21 +198,21 @@ class DeleteMotionActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"dd",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}
|
||||
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -25,20 +25,20 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
fun `test delete block SE direction`() {
|
||||
val keys = listOf("<C-V>e2j", "d")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |${c}found| it in a legendary land
|
||||
al|l roc|ks and lavender and tufted grass,
|
||||
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()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |$c| it in a legendary land
|
||||
al||ks and lavender and tufted grass,
|
||||
wh||t was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -47,20 +47,20 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
fun `test delete block SW direction`() {
|
||||
val keys = listOf("<C-V>b2j", "d")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |foun${c}d| it in a legendary land
|
||||
al|l roc|ks and lavender and tufted grass,
|
||||
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()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |$c| it in a legendary land
|
||||
al||ks and lavender and tufted grass,
|
||||
wh||t was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -69,20 +69,20 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
fun `test delete block NW direction`() {
|
||||
val keys = listOf("<C-V>b2k", "d")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |found| it in a legendary land
|
||||
al|l roc|ks and lavender and tufted grass,
|
||||
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()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |$c| it in a legendary land
|
||||
al||ks and lavender and tufted grass,
|
||||
wh||t was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -91,20 +91,20 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
fun `test delete block NE direction`() {
|
||||
val keys = listOf("<C-V>2e2k", "d")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |found| it in a legendary land
|
||||
al|l roc|ks and lavender and tufted grass,
|
||||
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()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |$c| it in a legendary land
|
||||
al||ks and lavender and tufted grass,
|
||||
wh||t was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
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
|
||||
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,
|
||||
where it was settled on some sodden sand
|
||||
${se}hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
${se}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
IdeaSelectionControl.controlNonVimSelectionChange(fixture.editor)
|
||||
@ -129,9 +129,9 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("d"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertState(VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
@ -141,7 +141,7 @@ class DeleteVisualActionTest : VimTestCase() {
|
||||
fun `test delete with dollar motion`() {
|
||||
val keys = listOf("<C-V>3j$", "d")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |${c}found it in a legendary land
|
||||
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.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I |
|
||||
al|
|
||||
|
@ -21,14 +21,14 @@ class DeleteVisualLinesActionTest : VimTestCase() {
|
||||
"vlllX",
|
||||
"""
|
||||
I found ${c}it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -40,15 +40,15 @@ class DeleteVisualLinesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"vlllX",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by ${c}the torrent of a mountain pass.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
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.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -61,14 +61,14 @@ class DeleteVisualLinesActionTest : VimTestCase() {
|
||||
"VX",
|
||||
"""
|
||||
I found ${c}it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -80,15 +80,15 @@ class DeleteVisualLinesActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"VX",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by ${c}the torrent of a mountain pass.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
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.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -99,19 +99,19 @@ class DeleteVisualLinesActionTest : VimTestCase() {
|
||||
fun `test multiple line delete till the end`() {
|
||||
val keys = "Vjd"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
${c}
|
||||
""".trimIndent()
|
||||
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`() {
|
||||
val keys = "Vjd"
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
${c}
|
||||
""".trimIndent()
|
||||
|
@ -25,19 +25,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -100,19 +100,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion with indent`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -122,19 +122,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion with indent and nostartofline`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c} all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c} consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after) {
|
||||
enterCommand("set nostartofline")
|
||||
@ -145,19 +145,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion empty line`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem Ipsum
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -166,20 +166,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion last line`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the ${c}torrent of a mountain pass.
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
@ -191,17 +191,17 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
val before = """
|
||||
A ${c}Discovery
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -210,21 +210,21 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion before empty`() {
|
||||
val keys = listOf("v", "D")
|
||||
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,
|
||||
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
${c}
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -233,19 +233,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion last line without empty line`() {
|
||||
val keys = listOf("v", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the ${c}torrent of a mountain pass.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
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.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -254,18 +254,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion multiline`() {
|
||||
val keys = listOf("vj", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -274,18 +274,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test simple deletion multiline motion up`() {
|
||||
val keys = listOf("vk", "D")
|
||||
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,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -313,19 +313,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line simple deletion`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -334,19 +334,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion with indent`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -356,19 +356,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion with indent and nostartofline`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c} all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c} consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after) {
|
||||
enterCommand("set nostartofline")
|
||||
@ -379,19 +379,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion empty line`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem Ipsum
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -400,20 +400,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion last line`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the ${c}torrent of a mountain pass.
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
@ -423,19 +423,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion last line without empty line`() {
|
||||
val keys = listOf("V", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the ${c}torrent of a mountain pass.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
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.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -444,18 +444,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion multiline`() {
|
||||
val keys = listOf("Vj", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -464,18 +464,18 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test line deletion multiline motion up`() {
|
||||
val keys = listOf("Vk", "D")
|
||||
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,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -503,20 +503,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test block simple deletion`() {
|
||||
val keys = listOf("<C-V>", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -525,20 +525,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test block deletion empty line`() {
|
||||
val keys = listOf("<C-V>", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
${c}
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
@ -547,20 +547,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test block deletion last line`() {
|
||||
val keys = listOf("<C-V>", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the${c} torrent of a mountain pass.
|
||||
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the
|
||||
|
||||
""".trimIndent()
|
||||
@ -571,19 +571,19 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test block deletion last line without empty line`() {
|
||||
val keys = listOf("<C-V>", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the${c} torrent of a mountain pass.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
@ -593,20 +593,20 @@ class DeleteVisualLinesEndActionTest : VimTestCase() {
|
||||
fun `test block deletion multiline`() {
|
||||
val keys = listOf("<C-V>j", "D")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I
|
||||
a
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
c
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after)
|
||||
}
|
||||
|
@ -38,20 +38,20 @@ class InsertAfterLineEndActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"AHello<esc>",
|
||||
"""
|
||||
${c}A Discovery
|
||||
${c}Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and ${c}lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectet${c}ur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A DiscoveryHell${c}o
|
||||
Lorem IpsumHell${c}o
|
||||
|
||||
I found it in a legendary landHell${c}o
|
||||
all rocks and lavender and tufted grass,Hell${c}o
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,Hell${c}o
|
||||
consectetur adipiscing elitHell${c}o
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -18,20 +18,20 @@ class InsertBeforeFirstNonBlankActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"IHello<esc>",
|
||||
"""
|
||||
${c}A Discovery
|
||||
${c}Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and ${c}lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consect${c}etur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
Hell${c}oA Discovery
|
||||
Hell${c}oLorem Ipsum
|
||||
|
||||
Hell${c}oI found it in a legendary land
|
||||
Hell${c}oall rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Hell${c}oLorem ipsum dolor sit amet,
|
||||
Hell${c}oconsectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -20,12 +20,12 @@ class InsertDeleteInsertedTextActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("yiw", "ea", "Hello", "<C-U>", "<ESC>p"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found ${c}it in a legendary land
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found iti${c}t in a legendary land
|
||||
""".trimIndent(),
|
||||
@ -41,12 +41,12 @@ class InsertDeleteInsertedTextActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("yiw", "eR", "Hello", "<C-U>", "<ESC>p"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found ${c}it in a legendary land
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found ii${c}ta legendary land
|
||||
""".trimIndent(),
|
||||
|
@ -68,12 +68,12 @@ class InsertDeletePreviousWordActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("i", "<C-W>", "<C-W>", "<C-W>", "<C-W>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery${c} found it in a legendary land
|
||||
Lorem Ipsum${c} found it in a legendary land
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -17,16 +17,16 @@ import org.junit.jupiter.api.Test
|
||||
class InsertEnterActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test insert enter`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".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,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest(listOf("i", "<Enter>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -34,16 +34,16 @@ class InsertEnterActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.CTRL_CODES)
|
||||
@Test
|
||||
fun `test insert enter with C-M`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".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,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest(listOf("i", "<C-M>"), before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -51,7 +51,7 @@ class InsertEnterActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.OPTION)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(5, 29)
|
||||
typeText("i", "<Enter>")
|
||||
|
@ -17,16 +17,16 @@ import org.junit.jupiter.api.Test
|
||||
class InsertNewLineAboveActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test insert new line above`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".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,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -49,32 +49,32 @@ class InsertNewLineAboveActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
fun `test insert new line above matches indent for plain text`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| ${c}where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| ${c}Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """ I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| $c
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test insert new line above matches indent for first line of plain text`() {
|
||||
val before = """ ${c}I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ ${c}Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """ $c
|
||||
| I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
| Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -120,7 +120,7 @@ class InsertNewLineAboveActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.OPTION)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(5, 15)
|
||||
typeText("O")
|
||||
@ -130,17 +130,17 @@ class InsertNewLineAboveActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
fun `test insert new line above first line`() {
|
||||
val before = """${c}I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val before = """${c}Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """
|
||||
|$c
|
||||
|I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("O", before, after, VimStateMachine.Mode.INSERT, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
@ -34,13 +34,13 @@ class PutViaIdeaTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT)
|
||||
@OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput]))
|
||||
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)
|
||||
|
||||
injector.registerGroup.storeText('"', "legendary", SelectionType.CHARACTER_WISE)
|
||||
|
||||
typeText("ve", "p")
|
||||
val after = "legendar${c}y it in a legendary land"
|
||||
val after = "legendar${c}y ipsum dolor sit amet,"
|
||||
assertState(after)
|
||||
}
|
||||
|
||||
@ -87,11 +87,11 @@ class PutViaIdeaTest : VimTestCase() {
|
||||
@OptionTest(VimOption(OptionConstants.clipboard, limitedValues = [OptionConstants.clipboard_ideaput]))
|
||||
fun `test insert block with newline`() {
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$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()
|
||||
configureByText(before)
|
||||
|
||||
@ -99,20 +99,20 @@ class PutViaIdeaTest : VimTestCase() {
|
||||
VimPlugin.getRegister().storeText(
|
||||
vimEditor,
|
||||
vimEditor.primaryCaret(),
|
||||
before rangeOf "\nI found it in a legendary land\n",
|
||||
before rangeOf "\nLorem ipsum dolor sit amet,\n",
|
||||
SelectionType.CHARACTER_WISE,
|
||||
false,
|
||||
)
|
||||
|
||||
typeText("p")
|
||||
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()
|
||||
assertState(after)
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
fun `test yank to number register with unnamed`() {
|
||||
val before = """
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
// Select and yank first word
|
||||
@ -34,7 +34,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
I it found in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
@ -43,7 +43,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
fun `test yank to number register with unnamed and ideaput`() {
|
||||
val before = """
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
// Select and yank first word
|
||||
@ -56,7 +56,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
I it found in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
@ -65,7 +65,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
fun `test yank to number register`() {
|
||||
val before = """
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
// Select and yank first word
|
||||
@ -78,7 +78,7 @@ class YankAndPutTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
I it found in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ class YankLineActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank to number register`() {
|
||||
val before = """
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
typeText(injector.parser.parseKeys("\"4yy"))
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ class YankMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank till new line`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary l${c}and
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
typeTextInFile("yW", file)
|
||||
val text = VimPlugin.getRegister().lastRegister?.text ?: kotlin.test.fail()
|
||||
@ -33,12 +33,12 @@ class YankMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank caret doesn't move`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary l${c}and
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(file)
|
||||
|
||||
@ -90,10 +90,10 @@ class YankMotionActionTest : VimTestCase() {
|
||||
val file = """
|
||||
A ${c}Discovery
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
typeTextInFile("yk", file)
|
||||
|
||||
@ -103,12 +103,12 @@ class YankMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank dollar at last empty line`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
$c
|
||||
""".trimIndent()
|
||||
typeTextInFile("y$", file)
|
||||
@ -120,12 +120,12 @@ class YankMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank to star with mapping`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
typeTextInFile(commandToKeys("map * *zz"), file)
|
||||
typeTextInFile("\"*yiw", file)
|
||||
@ -137,12 +137,12 @@ class YankMotionActionTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test yank to star with yank mapping`() {
|
||||
val file = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
typeTextInFile(commandToKeys("map * *yiw"), file)
|
||||
typeTextInFile("\"*", file)
|
||||
|
@ -231,20 +231,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${s}${c} f${se}ound it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
@ -257,20 +257,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -283,20 +283,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${s}${c} f${se}ound it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
@ -309,20 +309,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -335,20 +335,20 @@ class MotionArrowLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and ${c}lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and${c} lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -189,20 +189,20 @@ class MotionArrowRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}f${c}o${se}und it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
@ -215,20 +215,20 @@ class MotionArrowRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I f${c}ound it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -241,20 +241,20 @@ class MotionArrowRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}f${c}o${se}und it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
@ -267,20 +267,20 @@ class MotionArrowRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I f${c}ound it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -293,20 +293,20 @@ class MotionArrowRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and ${c}lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I f${c}ound it in a legendary land
|
||||
all rocks and l${c}avender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -26,20 +26,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test motion end`() {
|
||||
val keys = listOf("<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -49,20 +49,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test continue visual`() {
|
||||
val keys = listOf("v", "<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${s}legendary land${c}${se}
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER)
|
||||
}
|
||||
@ -72,20 +72,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test continue select`() {
|
||||
val keys = listOf("gh", "<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${s}legendary land${c}${se}
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.SELECT, VimStateMachine.SubMode.VISUAL_CHARACTER)
|
||||
}
|
||||
@ -95,20 +95,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test exit visual`() {
|
||||
val keys = listOf("v", "<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -118,20 +118,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test exit select`() {
|
||||
val keys = listOf("gh", "<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a ${c}legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -141,20 +141,20 @@ class MotionEndActionTest : VimTestCase() {
|
||||
fun `test delete to the end`() {
|
||||
val keys = listOf("d", "<End>")
|
||||
val before = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a leg${c}endary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a le${c}g
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest(keys, before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
@ -26,20 +26,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found ${c}it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found i${c}t in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -51,20 +51,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"3l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found ${c}it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it ${c}in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -76,20 +76,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"3l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -142,20 +142,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar${c}𝛁 land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar𝛁${c} land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -168,20 +168,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar${c}🐔 land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar🐔${c} land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -194,20 +194,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar${c}ž land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendarž${c} land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -219,19 +219,19 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"l",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar${c}. land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass
|
||||
""".trimIndent().dotToTab(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendar.${c} land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass
|
||||
""".trimIndent().dotToTab(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
@ -244,20 +244,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("v", "ll"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${s}d${c}${se}
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
@ -269,20 +269,20 @@ class MotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("<C-V>", "ll"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${c}d
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary lan${s}d${c}${se}
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_BLOCK,
|
||||
|
@ -26,12 +26,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
fun `test simple add mark`() {
|
||||
val keys = injector.parser.parseKeys("mA")
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
typeText(keys)
|
||||
@ -42,12 +42,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
fun `test simple add multiple marks`() {
|
||||
val keys = injector.parser.parseKeys("mAj" + "mBj" + "mC")
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
typeText(keys)
|
||||
@ -58,12 +58,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
fun `test simple add multiple marks on same line`() {
|
||||
val keys = injector.parser.parseKeys("mA" + "mB" + "mC")
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
typeText(keys)
|
||||
@ -77,12 +77,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
fun `test move to another line`() {
|
||||
val keys = injector.parser.parseKeys("mAjj" + "mA")
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
typeText(keys)
|
||||
@ -92,12 +92,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
@OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"]))
|
||||
fun `test simple system mark`() {
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
fixture.project.createLineBookmark(fixture.editor, 2, 'A')
|
||||
@ -110,12 +110,12 @@ class MotionMarkActionTest : VimTestCase() {
|
||||
@OptionTest(VimOption(IjOptionConstants.ideamarks, limitedValues = ["true"]))
|
||||
fun `test system mark move to another line`() {
|
||||
val text = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
configureByText(text)
|
||||
|
||||
|
@ -18,15 +18,15 @@ class MotionInnerBigWordActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"diW",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass$c.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain$c
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
|
@ -16,9 +16,9 @@ import org.junit.jupiter.api.Test
|
||||
class MotionOuterSentenceActionTest : VimTestCase() {
|
||||
@VimBehaviorDiffers(
|
||||
originalVimAfter = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
$c
|
||||
""",
|
||||
)
|
||||
@ -27,15 +27,15 @@ class MotionOuterSentenceActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"=as",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
$c
|
||||
""".trimIndent(),
|
||||
"""
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
@ -45,9 +45,9 @@ class MotionOuterSentenceActionTest : VimTestCase() {
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
originalVimAfter = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
$c
|
||||
""",
|
||||
)
|
||||
@ -56,9 +56,9 @@ class MotionOuterSentenceActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"das",
|
||||
"""
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
$c
|
||||
""".trimIndent(),
|
||||
"\n",
|
||||
|
@ -20,20 +20,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
|
||||
doTest(
|
||||
"gH",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
$s${c}I found it in a legendary land$se
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
$s${c}Lorem ipsum dolor sit amet,$se
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
VimStateMachine.SubMode.VISUAL_LINE,
|
||||
@ -45,19 +45,19 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
|
||||
doTest(
|
||||
"gH",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass$c.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${s}hard by the torrent of a mountain pass$c.$se
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
@ -70,20 +70,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
|
||||
doTest(
|
||||
"gH",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$c
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s$c$se
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
VimStateMachine.SubMode.VISUAL_LINE,
|
||||
@ -96,20 +96,20 @@ class SelectEnableLineModeActionHandlerTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("gH"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$c
|
||||
${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 ${c}settled on ${c}some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s$c$se
|
||||
$s${c}I found it in a legendary land$se
|
||||
all rocks and lavender and tufted grass,
|
||||
$s${c}Lorem ipsum dolor sit amet,$se
|
||||
consectetur adipiscing elit
|
||||
${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(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
VimStateMachine.SubMode.VISUAL_LINE,
|
||||
|
@ -32,20 +32,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viw", "<C-G>", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I foun${c}d it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -58,20 +58,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viwo", "<C-G>", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -84,20 +84,20 @@ class SelectMotionLeftActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viw", "<C-G>", "<Left>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}foun${c}${se}d it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
|
@ -27,20 +27,20 @@ class SelectMotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viw", "<C-G>", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found${c} it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -53,20 +53,20 @@ class SelectMotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viw", "<C-G>", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
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
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
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
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -79,20 +79,20 @@ class SelectMotionRightActionTest : VimTestCase() {
|
||||
doTest(
|
||||
listOf("viw", "<C-G>", "<Right>"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found ${c}${se}it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.SELECT,
|
||||
VimStateMachine.SubMode.VISUAL_CHARACTER,
|
||||
|
@ -21,9 +21,9 @@ class MotionParagraphPreviousActionTest : VimTestCase() {
|
||||
"d{",
|
||||
"""
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
hard by the torrent of a mountain pass$c.
|
||||
""".trimIndent(),
|
||||
".",
|
||||
|
@ -20,10 +20,10 @@ class MotionSectionForwardEndActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"d][",
|
||||
"""
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"$c.",
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
@ -37,10 +37,10 @@ class MotionSectionForwardEndActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"d][",
|
||||
"""
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
""".trimIndent(),
|
||||
"$c.\n",
|
||||
|
@ -182,7 +182,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
assertPosition(69, 4)
|
||||
assertVisibleArea(52, 86)
|
||||
@ -190,7 +190,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
assertPosition(99, 4)
|
||||
assertVisibleArea(65, 99)
|
||||
@ -198,7 +198,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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()
|
||||
typeText("G")
|
||||
assertPosition(99, 4)
|
||||
@ -207,7 +207,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
assertPosition(89, 4)
|
||||
assertVisibleArea(65, 99)
|
||||
@ -215,7 +215,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
typeText("95G")
|
||||
assertPosition(94, 4)
|
||||
@ -225,7 +225,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
@Test
|
||||
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
|
||||
configureByLines(100, " I found it in a legendary land")
|
||||
configureByLines(100, " Lorem ipsum dolor sit amet,")
|
||||
setPositionAndScroll(69, 85)
|
||||
typeText("G")
|
||||
assertPosition(99, 4)
|
||||
@ -234,7 +234,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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()
|
||||
setPositionAndScroll(85, 85)
|
||||
typeText("G")
|
||||
@ -244,7 +244,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
setPositionAndScroll(67, 97)
|
||||
@ -255,7 +255,7 @@ class MotionGotoLineLastActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
typeText("20G", "V10j", ":'< +'>action CollapseSelection<CR>", "V")
|
||||
|
@ -20,20 +20,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"1<C-V>",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}${c}f${se}ound it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_BLOCK,
|
||||
@ -45,20 +45,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"5<C-V>",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}foun${c}d${se} it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_BLOCK,
|
||||
@ -70,20 +70,20 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"100<C-V>",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found it in a legendary land${c}${se}
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_BLOCK,
|
||||
@ -105,12 +105,12 @@ class VisualToggleBlockModeActionTest : VimTestCase() {
|
||||
fun `test selectmode option`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand[long line]
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.[long line]
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
enterCommand("set selectmode=cmd")
|
||||
|
@ -20,20 +20,20 @@ class VisualToggleLineModeActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"1V",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${s}I ${c}found it in a legendary land
|
||||
${se}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${se}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_LINE,
|
||||
@ -45,20 +45,20 @@ class VisualToggleLineModeActionTest : VimTestCase() {
|
||||
doTest(
|
||||
"1V",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
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
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${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
|
||||
${se}hard by the torrent of a mountain pass.
|
||||
${se}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.VISUAL,
|
||||
VimStateMachine.SubMode.VISUAL_LINE,
|
||||
@ -119,12 +119,12 @@ class VisualToggleLineModeActionTest : VimTestCase() {
|
||||
fun `test selectmode option`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I${c} found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand[long line]
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.[long line]
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
enterCommand("set selectmode=cmd")
|
||||
|
@ -29,7 +29,7 @@ class ScrollFirstScreenLineActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("zt")
|
||||
assertPosition(19, 14)
|
||||
|
@ -35,7 +35,7 @@ class ScrollFirstScreenLinePageStartActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
typeText("z+")
|
||||
assertPosition(35, 4)
|
||||
|
@ -30,7 +30,7 @@ class ScrollFirstScreenLineStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z<CR>")
|
||||
assertPosition(19, 4)
|
||||
|
@ -143,7 +143,7 @@ class ScrollHalfPageDownActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
|
||||
typeText("<C-D>")
|
||||
@ -154,7 +154,7 @@ class ScrollHalfPageDownActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(20, 25, 14)
|
||||
|
||||
|
@ -113,7 +113,7 @@ class ScrollHalfPageUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
typeText("<C-U>")
|
||||
assertPosition(43, 4)
|
||||
@ -123,7 +123,7 @@ class ScrollHalfPageUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(50, 60, 14)
|
||||
typeText("<C-U>")
|
||||
|
@ -27,7 +27,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("zb")
|
||||
assertPosition(60, 14)
|
||||
@ -84,7 +84,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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()
|
||||
setPositionAndScroll(80, 99, 4)
|
||||
typeText("zb")
|
||||
@ -94,7 +94,7 @@ class ScrollLastScreenLineActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
setPositionAndScroll(80, 97, 4)
|
||||
|
@ -36,7 +36,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z^")
|
||||
assertPosition(98, 4)
|
||||
@ -77,7 +77,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
typeText("z^")
|
||||
assertPosition(0, 4)
|
||||
@ -86,7 +86,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z^")
|
||||
assertPosition(0, 4)
|
||||
@ -95,7 +95,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(0, 6)
|
||||
typeText("z^")
|
||||
@ -105,7 +105,7 @@ class ScrollLastScreenLinePageStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z^")
|
||||
assertPosition(18, 4)
|
||||
|
@ -29,7 +29,7 @@ class ScrollLastScreenLineStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z-")
|
||||
assertPosition(60, 4)
|
||||
|
@ -112,7 +112,7 @@ class ScrollLineDownActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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()
|
||||
setPositionAndScroll(75, 99, 4)
|
||||
typeText("<C-E>")
|
||||
@ -122,7 +122,7 @@ class ScrollLineDownActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
setPositionAndScroll(75, 95, 4)
|
||||
|
@ -126,7 +126,7 @@ class ScrollLineUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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()
|
||||
setPositionAndScroll(85, 90, 4)
|
||||
typeText("<C-Y>")
|
||||
@ -136,7 +136,7 @@ class ScrollLineUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
// Last line is scrolloff from top. <C-Y> should just move last line down
|
||||
@ -150,7 +150,7 @@ class ScrollLineUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setEditorVirtualSpace()
|
||||
setPositionAndScroll(65, 99, 4)
|
||||
|
@ -30,7 +30,7 @@ class ScrollMiddleScreenLineActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("zz")
|
||||
assertPosition(45, 14)
|
||||
|
@ -30,7 +30,7 @@ class ScrollMiddleScreenLineStartActionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
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)
|
||||
typeText("z.")
|
||||
assertPosition(45, 4)
|
||||
|
@ -260,7 +260,7 @@ class ScrollPageDownActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
typeText("<C-F>")
|
||||
assertPosition(53, 4)
|
||||
@ -270,7 +270,7 @@ class ScrollPageDownActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(20, 25, 14)
|
||||
typeText("<C-F>")
|
||||
|
@ -278,7 +278,7 @@ class ScrollPageUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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)
|
||||
typeText("<C-B>")
|
||||
assertPosition(51, 4)
|
||||
@ -288,7 +288,7 @@ class ScrollPageUpActionTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.SCROLL)
|
||||
@Test
|
||||
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")
|
||||
setPositionAndScroll(50, 60, 14)
|
||||
typeText("<C-B>")
|
||||
|
@ -17,8 +17,8 @@ import org.junit.jupiter.api.Test
|
||||
class BufferCloseCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test close file by bd command`() {
|
||||
val psiFile1 = fixture.configureByText("A_Discovery1", "I found it in a legendary land")
|
||||
val psiFile2 = fixture.configureByText("A_Discovery2", "all rocks and lavender and tufted grass,")
|
||||
val psiFile1 = fixture.configureByText("A_Discovery1", "Lorem ipsum dolor sit amet,")
|
||||
val psiFile2 = fixture.configureByText("A_Discovery2", "consectetur adipiscing elit")
|
||||
|
||||
fileManager.openFile(psiFile1.virtualFile, false)
|
||||
fileManager.openFile(psiFile2.virtualFile, true)
|
||||
|
@ -23,10 +23,10 @@ import kotlin.test.assertNull
|
||||
class DeleteMarksCommandTest : VimTestCase() {
|
||||
private fun setUpMarks(marks: String) {
|
||||
configureByText(
|
||||
"""I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
"""Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
|
||||
The features it combines mark it as new
|
||||
to science: shape and shade -- the special tinge,
|
||||
|
@ -21,7 +21,7 @@ class ExitCommandTest : VimTestCase() {
|
||||
neoVim.exitOnTearDown = false
|
||||
}
|
||||
@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)
|
||||
kotlin.test.assertNotNull<Any>(fileManager.currentFile)
|
||||
|
||||
@ -35,7 +35,7 @@ class ExitCommandTest : VimTestCase() {
|
||||
neoVim.exitOnTearDown = false
|
||||
}
|
||||
@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)
|
||||
kotlin.test.assertNotNull<Any>(fileManager.currentFile)
|
||||
|
||||
@ -49,8 +49,8 @@ class ExitCommandTest : VimTestCase() {
|
||||
setupChecks {
|
||||
neoVim.exitOnTearDown = false
|
||||
}
|
||||
val psiFile1 = fixture.configureByText("A_Discovery1", "I found it in a legendary land")
|
||||
val psiFile2 = fixture.configureByText("A_Discovery2", "all rocks and lavender and tufted grass,")
|
||||
val psiFile1 = fixture.configureByText("A_Discovery1", "Lorem ipsum dolor sit amet,")
|
||||
val psiFile2 = fixture.configureByText("A_Discovery2", "consectetur adipiscing elit")
|
||||
fileManager.openFile(psiFile1.virtualFile, false)
|
||||
fileManager.openFile(psiFile2.virtualFile, false)
|
||||
kotlin.test.assertNotNull<Any>(fileManager.currentFile)
|
||||
|
@ -21,19 +21,19 @@ class JoinLinesCommandTest : VimTestCase() {
|
||||
doTest(
|
||||
exCommand("j"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land$c all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -46,19 +46,19 @@ class JoinLinesCommandTest : VimTestCase() {
|
||||
doTest(
|
||||
exCommand("join"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land$c all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,$c consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -71,18 +71,18 @@ class JoinLinesCommandTest : VimTestCase() {
|
||||
doTest(
|
||||
exCommand("4,6j"),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass, where it was settled on some sodden sand$c hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit Sed in orci mauris.$c Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -93,22 +93,22 @@ class JoinLinesCommandTest : VimTestCase() {
|
||||
fun `test join multicaret`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
typeText(injector.parser.parseKeys("Vjj"))
|
||||
typeText(commandToKeys("join"))
|
||||
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
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit$c Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ class MapClearCommandTest : VimTestCase() {
|
||||
super.setUp(testInfo)
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ class MarkCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test simple mark`() {
|
||||
configureByText(
|
||||
"""I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
"""Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|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(),
|
||||
)
|
||||
typeText(commandToKeys("mark a"))
|
||||
@ -38,10 +38,10 @@ class MarkCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test global mark`() {
|
||||
configureByText(
|
||||
"""I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
"""Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|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(),
|
||||
)
|
||||
typeText(commandToKeys("mark G"))
|
||||
@ -55,10 +55,10 @@ class MarkCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test k mark`() {
|
||||
configureByText(
|
||||
"""I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
"""Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|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(),
|
||||
)
|
||||
typeText(commandToKeys("k a"))
|
||||
@ -72,10 +72,10 @@ class MarkCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test mark in range`() {
|
||||
configureByText(
|
||||
"""I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
"""Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|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(),
|
||||
)
|
||||
typeText(commandToKeys("1,2 mark a"))
|
||||
|
@ -91,10 +91,10 @@ class MarksCommandTest : VimTestCase() {
|
||||
@Test
|
||||
fun `test line number is 1-based and column is 0-based`() {
|
||||
configureByText(
|
||||
"""${c}I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
"""${c}Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin(),
|
||||
)
|
||||
typeText(injector.parser.parseKeys("ma"))
|
||||
@ -102,7 +102,7 @@ class MarksCommandTest : VimTestCase() {
|
||||
enterCommand("marks")
|
||||
assertExOutput(
|
||||
"""mark line col file/text
|
||||
| a 1 0 I found it in a legendary land
|
||||
| a 1 0 Lorem ipsum dolor sit amet,
|
||||
""".trimMargin(),
|
||||
)
|
||||
}
|
||||
@ -157,9 +157,9 @@ class MarksCommandTest : VimTestCase() {
|
||||
fun `test argument filters output`() {
|
||||
configureByText(
|
||||
"""I found ${c}it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin(),
|
||||
)
|
||||
typeText(injector.parser.parseKeys("ma" + "jl"))
|
||||
@ -170,8 +170,8 @@ class MarksCommandTest : VimTestCase() {
|
||||
enterCommand("marks bdD")
|
||||
assertExOutput(
|
||||
"""mark line col file/text
|
||||
| b 2 9 all rocks and lavender and tufted grass,
|
||||
| D 4 11 hard by the torrent of a mountain pass.
|
||||
| b 2 9 consectetur adipiscing elit
|
||||
| D 4 11 Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin(),
|
||||
)
|
||||
}
|
||||
@ -180,9 +180,9 @@ class MarksCommandTest : VimTestCase() {
|
||||
fun `test list nothing if no marks match`() {
|
||||
configureByText(
|
||||
"""I found ${c}it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin(),
|
||||
)
|
||||
typeText(injector.parser.parseKeys("ma" + "jl"))
|
||||
@ -194,9 +194,9 @@ class MarksCommandTest : VimTestCase() {
|
||||
fun `test correctly handles invalid mark location`() {
|
||||
configureByText(
|
||||
"""I found ${c}it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin(),
|
||||
)
|
||||
val vimEditor = fixture.editor.vim
|
||||
@ -204,7 +204,7 @@ class MarksCommandTest : VimTestCase() {
|
||||
enterCommand("marks")
|
||||
assertExOutput(
|
||||
"""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(),
|
||||
)
|
||||
}
|
||||
|
@ -16,14 +16,14 @@ class PrintCommandTest : VimTestCase() {
|
||||
fun `test default range`() {
|
||||
configureByText(initialText)
|
||||
typeText(commandToKeys("p"))
|
||||
assertExOutput("A Discovery\n")
|
||||
assertExOutput("Lorem Ipsum\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test default range with P`() {
|
||||
configureByText(initialText)
|
||||
typeText(commandToKeys("P"))
|
||||
assertExOutput("A Discovery\n")
|
||||
assertExOutput("Lorem Ipsum\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -39,9 +39,9 @@ class PrintCommandTest : VimTestCase() {
|
||||
typeText(commandToKeys("p 3"))
|
||||
assertExOutput(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
Lorem ipsum dolor sit amet,
|
||||
|
||||
""".trimIndent(),
|
||||
)
|
||||
@ -49,12 +49,12 @@ class PrintCommandTest : VimTestCase() {
|
||||
|
||||
companion object {
|
||||
private val initialText = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
}
|
||||
}
|
||||
|
@ -20,19 +20,19 @@ class ShiftLeftCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
|
||||
@Test
|
||||
fun `test simple left shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys("<"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
@ -40,19 +40,19 @@ class ShiftLeftCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
|
||||
@Test
|
||||
fun `test double left shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys("<<"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
@ -60,19 +60,19 @@ class ShiftLeftCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
|
||||
@Test
|
||||
fun `test left shift no space`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys("<"))
|
||||
|
||||
val after = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
@ -80,19 +80,19 @@ class ShiftLeftCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "bad replce term codes")
|
||||
@Test
|
||||
fun `test range left shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys("3,4<"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| ${c}where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| ${c}Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
|
@ -20,19 +20,19 @@ class ShiftRightCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
|
||||
@Test
|
||||
fun `test simple right shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys(">"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
@ -40,19 +40,19 @@ class ShiftRightCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
|
||||
@Test
|
||||
fun `test double right shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys(">>"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
@ -60,19 +60,19 @@ class ShiftRightCommandTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.DIFFERENT, "Replace term codes issues")
|
||||
@Test
|
||||
fun `test range right shift`() {
|
||||
val before = """ I found it in a legendary land
|
||||
| ${c}all rocks and lavender and tufted grass,
|
||||
| where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val before = """ Lorem ipsum dolor sit amet,
|
||||
| ${c}consectetur adipiscing elit
|
||||
| Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
configureByJavaText(before)
|
||||
|
||||
typeText(commandToKeys("3,4>"))
|
||||
|
||||
val after = """ I found it in a legendary land
|
||||
| all rocks and lavender and tufted grass,
|
||||
| ${c}where it was settled on some sodden sand
|
||||
| hard by the torrent of a mountain pass.
|
||||
val after = """ Lorem ipsum dolor sit amet,
|
||||
| consectetur adipiscing elit
|
||||
| ${c}Sed in orci mauris.
|
||||
| Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
assertState(after)
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ class UnMapCommandTest : VimTestCase() {
|
||||
super.setUp(testInfo)
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
@ -17,19 +17,19 @@ class YankLinesCommandTest : VimTestCase() {
|
||||
fun `test copy with range`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
h
|
||||
""".trimIndent(),
|
||||
)
|
||||
typeText(commandToKeys("3,4y"))
|
||||
val yanked = VimPlugin.getRegister().lastRegister!!.text
|
||||
kotlin.test.assertEquals(
|
||||
"""|I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
"""|Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|
|
||||
""".trimMargin(),
|
||||
yanked,
|
||||
@ -40,11 +40,11 @@ class YankLinesCommandTest : VimTestCase() {
|
||||
fun `test copy with one char on the last line`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
h
|
||||
""".trimIndent(),
|
||||
)
|
||||
@ -52,11 +52,11 @@ class YankLinesCommandTest : VimTestCase() {
|
||||
val yanked = VimPlugin.getRegister().lastRegister!!.text
|
||||
kotlin.test.assertEquals(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
h
|
||||
|
||||
""".trimIndent(),
|
||||
|
@ -100,18 +100,18 @@ class OpMappingTest : VimTestCase() {
|
||||
doTest(
|
||||
"dO",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.COMMAND,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -578,17 +578,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection`() {
|
||||
val before = """
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
${c}I found it in a legendary land
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
${c}consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vjj<A-n>", before, after)
|
||||
}
|
||||
@ -596,16 +596,16 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection till the last line`() {
|
||||
val before = """
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
${c}I found it in a legendary land
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
${c}consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vjjj<A-n>", before, after)
|
||||
}
|
||||
@ -613,17 +613,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection moving up`() {
|
||||
val before = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
${c}I found it in a legendary land
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
${c}consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vkk<A-n>", before, after)
|
||||
}
|
||||
@ -631,17 +631,17 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection moving up from down`() {
|
||||
val before = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
I found it in a legendary land
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
${c}where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
${c}consectetur adipiscing elit
|
||||
${c}Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vkk<A-n>", before, after)
|
||||
}
|
||||
@ -649,23 +649,23 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection moving up to empty lines`() {
|
||||
val before = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
|
||||
|
||||
where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
|
||||
$c
|
||||
$c
|
||||
${c}where it was settled on some sodden sand
|
||||
${c}hard by the torrent of a mountain pass.
|
||||
${c}Sed in orci mauris.
|
||||
${c}Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vkkk<A-n>", before, after)
|
||||
}
|
||||
@ -673,23 +673,23 @@ fun getCellType(${s}pos$se: VisualPosition): CellType {
|
||||
@Test
|
||||
fun `test adding multicaret after linewise selection moving down to empty lines`() {
|
||||
val before = """
|
||||
${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
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
${c}I found it in a legendary land
|
||||
${c}all rocks and lavender and tufted grass,
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
${c}consectetur adipiscing elit
|
||||
$c
|
||||
$c
|
||||
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
doTest("Vjjj<A-n>", before, after)
|
||||
}
|
||||
|
@ -24,102 +24,102 @@ class ParagraphMotionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
fun `test paragraph next without whitespace`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|$c
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test paragraph next with whitespace`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
val after = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|$c....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
doTest("}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test paragraph next with whitespace visual`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
val after = """I found it in a legendary land
|
||||
|${s}all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|${s}consectetur adipiscing elit
|
||||
|$c.$se...
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
doTest("v}", before, after, VimStateMachine.Mode.VISUAL, VimStateMachine.SubMode.VISUAL_CHARACTER)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test paragraph next with whitespace delete`() {
|
||||
val before = """I found it in a legendary land
|
||||
|${c}all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|${c}consectetur adipiscing elit
|
||||
|....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
val after = """I found it in a legendary land
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|$c
|
||||
|....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
doTest("d}", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test paragraph prev without whitespace`() {
|
||||
val before = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|
|
||||
|${c}where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
val after = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|$c
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin()
|
||||
doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test paragraph prev with whitespace`() {
|
||||
val before = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|....
|
||||
|${c}where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
val after = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|$c....
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
doTest("{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
@ -143,17 +143,17 @@ class ParagraphMotionTest : VimTestCase() {
|
||||
|
||||
@Test
|
||||
fun `test paragraph prev with whitespace delete`() {
|
||||
val before = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val before = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|....
|
||||
|${c}where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|${c}Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
val after = """I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
val after = """Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
|$c
|
||||
|where it was settled on some sodden sand
|
||||
|hard by the torrent of a mountain pass.
|
||||
|Sed in orci mauris.
|
||||
|Cras id tellus in ex imperdiet egestas.
|
||||
""".trimMargin().dotToSpace()
|
||||
doTest("d{", before, after, VimStateMachine.Mode.COMMAND, VimStateMachine.SubMode.NONE)
|
||||
}
|
||||
|
@ -205,9 +205,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
fun `test line replace`() {
|
||||
val text = """
|
||||
I found it in ${c}a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
configureByText(text)
|
||||
@ -218,9 +218,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
${c}legendary
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text)
|
||||
@ -338,10 +338,10 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
"""
|
||||
I found it in a legendary land
|
||||
${c}I found it in a legendary land
|
||||
where it was settled on some sodden sand
|
||||
${c}where it was settled on some sodden sand
|
||||
Lorem ipsum dolor sit amet,
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
Sed in orci mauris.
|
||||
${c}Sed in orci mauris.
|
||||
""",
|
||||
)
|
||||
@Test
|
||||
@ -372,9 +372,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
fun `test visual replace`() {
|
||||
val text = """
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
configureByText(text)
|
||||
@ -385,9 +385,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
I legendar${c}y it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
kotlin.test.assertEquals("legendary", VimPlugin.getRegister().lastRegister?.text)
|
||||
@ -443,9 +443,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
fun `test visual line replace`() {
|
||||
val text = """
|
||||
I fo${c}und it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
||||
configureByText(text)
|
||||
@ -456,9 +456,9 @@ class ReplaceWithRegisterTest : VimTestCase() {
|
||||
assertState(
|
||||
"""
|
||||
${c}legendary
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
|
@ -37,12 +37,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection no selection`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I $s$c${se}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -57,12 +57,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection cursor in the middle`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found$c it$se in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -75,12 +75,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found ${c}i${se}t in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -90,12 +90,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
|
||||
@VimBehaviorDiffers(
|
||||
originalVimAfter = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found i${c}t$se in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""",
|
||||
)
|
||||
@OptionTest(VimOption(OptionConstants.selectmode, doesntAffectTest = true))
|
||||
@ -103,12 +103,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection cursor on end`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found it$c$se in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -121,12 +121,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found it ${c}i${se}n a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -139,12 +139,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection cursor on start`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I $s${c}found it$se in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -157,12 +157,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I f${s}${c}ound it$se in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -175,12 +175,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection lineend`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found ${c}it in a legendary land$se
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -193,12 +193,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found i${c}t${se} in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -211,12 +211,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection next line`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found ${c}it in a legendary land
|
||||
${se}all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${se}consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -229,12 +229,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found i${c}t${se} in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -247,12 +247,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection start on line start`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${s}I found ${c}it ${se}in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -265,12 +265,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
${s}I found i${c}t${se} in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -283,12 +283,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection start on line end`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s
|
||||
I found ${c}it ${se}in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -301,12 +301,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s
|
||||
I found i${c}t${se} in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -319,7 +319,7 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection multicaret`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s
|
||||
I found ${c}it ${se}in a legendary land
|
||||
all rocks $s$c${se}and lavender and tufted grass,
|
||||
@ -337,7 +337,7 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
$s
|
||||
I found i${c}t${se} in a legendary land
|
||||
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`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found$c$se it in a legendary land
|
||||
al${s}l roc$c${se}ks and lavender and tufted grass,
|
||||
@ -607,12 +607,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test enable character selection`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found$c$se it in a legendary land
|
||||
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
|
||||
hard by the torrent of a mountain pass.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.COMMAND)
|
||||
@ -625,12 +625,12 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
typeText(injector.parser.parseKeys("l"))
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${s}found ${c}i${se}t in a legendary land
|
||||
al${s}l rock${c}s${se} and lavender and tufted grass,
|
||||
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(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.VISUAL)
|
||||
@ -715,10 +715,10 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test control selection`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
VimListenerManager.EditorListeners.addAll()
|
||||
@ -734,10 +734,10 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test control selection to visual mode`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
VimListenerManager.EditorListeners.addAll()
|
||||
@ -753,10 +753,10 @@ class IdeaVisualControlTest : VimTestCase() {
|
||||
fun `test control selection from line to char visual modes`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
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`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
consectetur adipiscing elit
|
||||
""".trimIndent(),
|
||||
)
|
||||
|
||||
|
@ -37,12 +37,12 @@ class NonVimVisualChangeTest : VimTestCase() {
|
||||
// See https://github.com/JetBrains/ideavim/pull/186#issuecomment-486656093
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
VimListenerManager.EditorListeners.add(fixture.editor)
|
||||
@ -55,12 +55,12 @@ class NonVimVisualChangeTest : VimTestCase() {
|
||||
}
|
||||
assertState(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
assertMode(VimStateMachine.Mode.INSERT)
|
||||
@ -71,12 +71,12 @@ class NonVimVisualChangeTest : VimTestCase() {
|
||||
fun `test enable and disable selection`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
VimListenerManager.EditorListeners.add(fixture.editor)
|
||||
@ -95,12 +95,12 @@ class NonVimVisualChangeTest : VimTestCase() {
|
||||
fun `test enable, disable, and enable selection again`() {
|
||||
configureByText(
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I ${c}found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
)
|
||||
VimListenerManager.EditorListeners.add(fixture.editor)
|
||||
|
@ -25,14 +25,14 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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)
|
||||
}
|
||||
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
|
||||
}
|
||||
@ -40,7 +40,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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>")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
|
||||
}
|
||||
@ -48,7 +48,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test default replace mode caret is underscore`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("R")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.2F)
|
||||
}
|
||||
@ -56,7 +56,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.5F)
|
||||
}
|
||||
@ -64,7 +64,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test caret is reset after op pending`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("d$")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
|
||||
}
|
||||
@ -72,7 +72,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test default visual mode caret is block`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("ve")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
|
||||
}
|
||||
@ -80,7 +80,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0F)
|
||||
fixture.editor.caretModel.allCarets.forEach {
|
||||
@ -95,7 +95,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@Test
|
||||
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
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("v7l", "<C-G>")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
|
||||
}
|
||||
@ -194,7 +194,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.UNDERSCORE, 0.22F)
|
||||
}
|
||||
@ -202,7 +202,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test changing guicursor option invalidates caches correctly`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("i")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
|
||||
typeText("<Esc>")
|
||||
@ -214,7 +214,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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
|
||||
enterCommand("set guicursor+=i:ver25")
|
||||
enterCommand("set guicursor+=i:hor75")
|
||||
@ -225,7 +225,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0.0F)
|
||||
typeText("i")
|
||||
@ -235,7 +235,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test 'all' guicursor option`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
enterCommand("set guicursor+=a:ver25")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
|
||||
}
|
||||
@ -243,7 +243,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
typeText("i")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BAR, 0.25F)
|
||||
@ -252,7 +252,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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
|
||||
enterCommand("set guicursor+=a:ver25")
|
||||
enterCommand("set guicursor+=i:hor75")
|
||||
@ -266,7 +266,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
val originalValue = EditorSettingsExternalizable.getInstance().isBlockCursor
|
||||
EditorSettingsExternalizable.getInstance().isBlockCursor = true
|
||||
try {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("i")
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 1.0F)
|
||||
} finally {
|
||||
@ -277,7 +277,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `test reset caret shape when disable plugin`() {
|
||||
configureByText("I found it in a legendary land")
|
||||
configureByText("Lorem ipsum dolor sit amet,")
|
||||
typeText("i")
|
||||
VimPlugin.setEnabled(false)
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
|
||||
@ -286,7 +286,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
VimPlugin.setEnabled(false)
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
|
||||
@ -295,7 +295,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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")
|
||||
VimPlugin.setEnabled(false)
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.DEFAULT, 1.0f)
|
||||
@ -304,7 +304,7 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
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))
|
||||
assertCaretVisualAttributes(CaretVisualAttributes.Shape.BLOCK, 0f)
|
||||
}
|
||||
@ -314,8 +314,8 @@ class CaretVisualAttributesHelperTest : VimTestCase() {
|
||||
fun `test adding new caret below`() {
|
||||
configureByText(
|
||||
"""
|
||||
|${c}I found it in a legendary land
|
||||
|all rocks and lavender and tufted grass,
|
||||
|${c}Lorem ipsum dolor sit amet,
|
||||
|consectetur adipiscing elit
|
||||
""".trimMargin(),
|
||||
)
|
||||
injector.actionExecutor.executeAction(
|
||||
|
@ -25,20 +25,20 @@ class DigraphTest : VimTestCase() {
|
||||
doTest(
|
||||
"i B<BS>B",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it ¦$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -53,20 +53,20 @@ class DigraphTest : VimTestCase() {
|
||||
doTest(
|
||||
"i B<BS>BHello",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it ¦Hello$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -81,20 +81,20 @@ class DigraphTest : VimTestCase() {
|
||||
doTest(
|
||||
"i B<BS><BS>B",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found itB$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
@ -109,20 +109,20 @@ class DigraphTest : VimTestCase() {
|
||||
doTest(
|
||||
"i B<BS>B<BS>B",
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
"""
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it B$c in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent(),
|
||||
VimStateMachine.Mode.INSERT,
|
||||
VimStateMachine.SubMode.NONE,
|
||||
|
@ -79,10 +79,10 @@ class RandomActionsPropertyTest : VimPropertyTestBase() {
|
||||
|
||||
companion object {
|
||||
private val text = """
|
||||
${c}I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
${c}Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
package org.jetbrains.plugins.ideavim.propertybased.samples
|
||||
|
||||
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.
|
||||
|
||||
|
@ -9,10 +9,10 @@
|
||||
package org.jetbrains.plugins.ideavim.propertybased.samples
|
||||
|
||||
internal val simpleText = """
|
||||
A Discovery
|
||||
Lorem Ipsum
|
||||
|
||||
I found it in a legendary land
|
||||
all rocks and lavender and tufted grass,
|
||||
where it was settled on some sodden sand
|
||||
hard by the torrent of a mountain pass.
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing elit
|
||||
Sed in orci mauris.
|
||||
Cras id tellus in ex imperdiet egestas.
|
||||
""".trimIndent()
|
||||
|
@ -25,7 +25,7 @@ class ShowCmdTest : VimTestCase() {
|
||||
@BeforeEach
|
||||
override fun setUp(testInfo: TestInfo) {
|
||||
super.setUp(testInfo)
|
||||
val before = "${c}I found it in a legendary land"
|
||||
val before = "${c}Lorem ipsum dolor sit amet,"
|
||||
configureByText(before)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user