-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
227 additions
and
153 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/test/java/org/jetbrains/plugins/ideavim/IjSharedTestCaseList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright 2003-2024 The IdeaVim authors | ||
* | ||
* Use of this source code is governed by an MIT-style | ||
* license that can be found in the LICENSE.txt file or at | ||
* https://opensource.org/licenses/MIT. | ||
*/ | ||
|
||
package org.jetbrains.plugins.ideavim | ||
|
||
import com.maddyhome.idea.vim.model.SharedTestCase | ||
import com.maddyhome.idea.vim.SharedTestCaseList | ||
import org.jetbrains.plugins.ideavim.action.change.delete.DeleteVisualLinesActionTestImpl | ||
import org.jetbrains.plugins.ideavim.action.change.insert.InsertDeleteActionTestImpl | ||
|
||
@Suppress("unused") | ||
class IjSharedTestCaseList : SharedTestCaseList { | ||
override val insertDeleteActionTest: SharedTestCase = InsertDeleteActionTestImpl() | ||
override val deleteVisualLinesActionTest: SharedTestCase = DeleteVisualLinesActionTestImpl() | ||
} |
139 changes: 0 additions & 139 deletions
139
...st/java/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesActionTest.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...ava/org/jetbrains/plugins/ideavim/action/change/delete/DeleteVisualLinesActionTestImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright 2003-2023 The IdeaVim authors | ||
* | ||
* Use of this source code is governed by an MIT-style | ||
* license that can be found in the LICENSE.txt file or at | ||
* https://opensource.org/licenses/MIT. | ||
*/ | ||
|
||
@file:Suppress("RemoveCurlyBracesFromTemplate") | ||
|
||
package org.jetbrains.plugins.ideavim.action.change.delete | ||
|
||
import com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesActionTest | ||
import org.jetbrains.plugins.ideavim.VimTestCaseBase | ||
|
||
class DeleteVisualLinesActionTestImpl : DeleteVisualLinesActionTest, VimTestCaseBase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
155 changes: 155 additions & 0 deletions
155
...rc/test/kotlin/com/maddyhome/idea/vim/action/change/delete/DeleteVisualLinesActionTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
/* | ||
* Copyright 2003-2023 The IdeaVim authors | ||
* | ||
* Use of this source code is governed by an MIT-style | ||
* license that can be found in the LICENSE.txt file or at | ||
* https://opensource.org/licenses/MIT. | ||
*/ | ||
|
||
@file:Suppress("RemoveCurlyBracesFromTemplate") | ||
|
||
package com.maddyhome.idea.vim.action.change.delete | ||
|
||
import com.maddyhome.idea.vim.model.VimTestCase | ||
import com.maddyhome.idea.vim.state.mode.Mode | ||
import org.junit.jupiter.api.Test | ||
|
||
interface DeleteVisualLinesActionTest : VimTestCase { | ||
@Test | ||
fun `test remove line in char visual mode`() { | ||
configureByText( | ||
""" | ||
I found ${c}it in a legendary land | ||
consectetur adipiscing elit | ||
Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent(), | ||
) | ||
typeText("vlllX") | ||
assertState( | ||
""" | ||
${c}consectetur adipiscing elit | ||
Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent(), | ||
Mode.NORMAL() | ||
) | ||
} | ||
|
||
@Test | ||
fun `test remove line in char visual mode last line`() { | ||
configureByText( | ||
""" | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
Sed in orci mauris. | ||
hard by ${c}the torrent of a mountain pass. | ||
""".trimIndent(), | ||
) | ||
typeText("vlllX") | ||
assertState( | ||
""" | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c}Sed in orci mauris. | ||
""".trimIndent(), | ||
Mode.NORMAL(), | ||
) | ||
} | ||
|
||
@Test | ||
fun `test remove line in line visual mode`() { | ||
configureByText( | ||
""" | ||
I found ${c}it in a legendary land | ||
consectetur adipiscing elit | ||
Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent(), | ||
) | ||
typeText("VX") | ||
assertState( | ||
""" | ||
${c}consectetur adipiscing elit | ||
Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent(), | ||
Mode.NORMAL(), | ||
) | ||
} | ||
|
||
@Test | ||
fun `test remove line in line visual mode line end`() { | ||
configureByText( | ||
""" | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
Sed in orci mauris. | ||
hard by ${c}the torrent of a mountain pass. | ||
""".trimIndent(), | ||
) | ||
typeText("VX") | ||
assertState( | ||
""" | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c}Sed in orci mauris. | ||
""".trimIndent(), | ||
Mode.NORMAL(), | ||
) | ||
} | ||
|
||
@Test | ||
fun `test multiple line delete till the end`() { | ||
configureByText( | ||
""" | ||
Lorem Ipsum | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c}Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent() | ||
) | ||
typeText("Vjd") | ||
assertState( | ||
""" | ||
Lorem Ipsum | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c} | ||
""".trimIndent(), | ||
Mode.NORMAL(), | ||
) | ||
} | ||
|
||
@Test | ||
fun `test multiple line delete till the end with a new line`() { | ||
configureByText( | ||
""" | ||
Lorem Ipsum | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c}Sed in orci mauris. | ||
Cras id tellus in ex imperdiet egestas. | ||
""".trimIndent() | ||
) | ||
typeText("Vjd") | ||
assertState( | ||
""" | ||
Lorem Ipsum | ||
Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit | ||
${c} | ||
""".trimIndent(), | ||
Mode.NORMAL(), | ||
) | ||
} | ||
} |
Oops, something went wrong.