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

Remove tests using obsolete newregex option

This commit is contained in:
Matt Ellis 2024-12-07 09:50:26 -08:00 committed by Alex Pláte
parent e0e7817b8b
commit 12ed60d88e

View File

@ -951,21 +951,6 @@ class SearchGroupTest : VimTestCase() {
assertPosition(0, 0)
}
@Test
fun `test search beginning of file atom with old regex engine`() {
configureByText(
"""
one
${c}two
one
two
""".trimIndent()
)
enterCommand("set nousenewregex")
enterSearch("""\%^""")
assertPosition(0, 0)
}
@Test
fun `test search end of file atom`() {
configureByText(
@ -980,21 +965,6 @@ class SearchGroupTest : VimTestCase() {
assertPosition(3, 0)
}
@Test
fun `test search end of file atom with old regex engine`() {
configureByText(
"""
one
two
one
two
""".trimIndent()
)
enterCommand("set nousenewregex")
enterSearch("""two\%$""")
assertPosition(3, 0)
}
@TestFor(classes = [SearchWholeWordForwardAction::class])
@Test
fun `test search word matches case`() {
@ -2834,24 +2804,6 @@ class SearchGroupTest : VimTestCase() {
assertEquals(9, res)
}
// VIM-2510
@Test
fun `test backslash-i does not hang while trying to highlight all instances with old regex engine`() {
// \i - identifier character class.
// The old regex engine would treat '\0' as a valid identifier, which is unfortunate, because that marks the end of
// each search input line. There is also no validation on the column, so it would continuously match the end of line
// marker and increment the column even though there was no column.
// We should also be using 'isident' instead of Character.isJavaIdentifierPart, but let's not worry about the old
// engine now.
doTest(
searchCommand("/\\i"),
"""lorem ipsum""",
"""l${c}orem ipsum"""
) {
enterCommand("set hlsearch nousenewregex")
}
}
private fun search(pattern: String, input: String): Int {
configureByText(input)
val editor = fixture.editor