mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-03 01:22:33 +01:00
Long running tests
This commit is contained in:
parent
63ecaff1bc
commit
6500ce9154
src/test/java/org/jetbrains/plugins/ideavim
@ -732,21 +732,6 @@ n ,f <Plug>Foo
|
||||
TestCase.assertTrue(VimPlugin.isError())
|
||||
}
|
||||
|
||||
fun `test double recursion`() {
|
||||
val text = """
|
||||
-----
|
||||
1${c}2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent()
|
||||
configureByJavaText(text)
|
||||
|
||||
typeText(commandToKeys("map b wbb"))
|
||||
typeText(StringHelper.parseKeys("b"))
|
||||
|
||||
TestCase.assertTrue(VimPlugin.isError())
|
||||
}
|
||||
|
||||
fun `test map with expression`() {
|
||||
// we test that ternary expression works and cursor stays at the same place after leaving normal mode
|
||||
val text = """
|
||||
|
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.jetbrains.plugins.ideavim.longrunning
|
||||
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.parseKeys
|
||||
import org.jetbrains.plugins.ideavim.VimTestCase
|
||||
|
||||
class MacroTest : VimTestCase() {
|
||||
|
||||
// was a problem on revision affec9bb61ea5e1e635673a0041d61f7af3722b2
|
||||
fun `test no StackOverflowException`() {
|
||||
configureByText("abc de${c}fg")
|
||||
typeText(parseKeys("qahlq"))
|
||||
typeText(parseKeys("1000000@a"))
|
||||
assertState("abc de${c}fg")
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.jetbrains.plugins.ideavim.longrunning
|
||||
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.helper.StringHelper
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.plugins.ideavim.VimTestCase
|
||||
|
||||
class MapCommandTest : VimTestCase() {
|
||||
|
||||
fun `test double recursion`() {
|
||||
val text = """
|
||||
-----
|
||||
1${c}2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent()
|
||||
configureByJavaText(text)
|
||||
|
||||
typeText(commandToKeys("map b wbb"))
|
||||
typeText(StringHelper.parseKeys("b"))
|
||||
|
||||
TestCase.assertTrue(VimPlugin.isError())
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user